// Path: src/main/java/com/ebay/xcelite/exceptions/XceliteException.java
// public class XceliteException extends RuntimeException {
// 
//   private static final long serialVersionUID = 1L;
// 
//   public XceliteException(String message) {
//     super(message);
//   }
// 
//   public XceliteException(Exception exception) {
//     super(exception);
//   }
// 
//   public XceliteException(String message, Exception exception) {
//     super(message, exception);
//   }
// }
// 
// Path: src/main/java/com/ebay/xcelite/sheet/XceliteSheet.java
// public interface XceliteSheet {
// 
//   <T> SheetWriter<T> getBeanWriter(Class<T> type);
//   <T> SheetReader<T> getBeanReader(Class<T> type);
//   SheetWriter<Collection<Object>> getSimpleWriter();
//   SheetReader<Collection<Object>> getSimpleReader();
//   Sheet getNativeSheet();
//   File getFile();
// }
// 
// Path: src/main/java/com/ebay/xcelite/sheet/XceliteSheetImpl.java
// public class XceliteSheetImpl implements XceliteSheet {
// 
//   private final Sheet sheet;
//   private final File file;
// 
//   public XceliteSheetImpl(Sheet sheet) {
//     this(sheet, null);
//   }
//   
//   public XceliteSheetImpl(Sheet sheet, File file) {
//     this.sheet = sheet;
//     this.file = file;
//   }
//   
//   @Override
//   public Sheet getNativeSheet() {
//     return sheet;
//   }
// 
//   @Override
//   public File getFile() {
//     return file;
//   }
// 
//   @Override
//   public <T> SheetWriter<T> getBeanWriter(Class<T> type) {
//     return new BeanSheetWriter<T>(this, type);
//   }
// 
//   @Override
//   public <T> SheetReader<T> getBeanReader(Class<T> type) {
//     return new BeanSheetReader<T>(this, type);
//   } 
// 
//   @Override
//   public SimpleSheetWriter getSimpleWriter() {
//     return new SimpleSheetWriter(this);
//   }
// 
//   @Override
//   public SheetReader<Collection<Object>> getSimpleReader() {
//     return new SimpleSheetReader(this);
//   }
// }


import java.io.ByteArrayOutputStream;
import java.io.File;
import java.io.FileInputStream;
import java.io.FileNotFoundException;
import java.io.FileOutputStream;
import java.io.IOException;
import org.apache.poi.ss.usermodel.Sheet;
import org.apache.poi.ss.usermodel.Workbook;
import org.apache.poi.xssf.usermodel.XSSFWorkbook;
import com.ebay.xcelite.exceptions.XceliteException;
import com.ebay.xcelite.sheet.XceliteSheet;
import com.ebay.xcelite.sheet.XceliteSheetImpl;

/*
  Copyright [2013-2014] eBay Software Foundation

   Licensed under the Apache License, Version 2.0 (the "License");
   you may not use this file except in compliance with the License.
   You may obtain a copy of the License at

       http://www.apache.org/licenses/LICENSE-2.0

   Unless required by applicable law or agreed to in writing, software
   distributed under the License is distributed on an "AS IS" BASIS,
   WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
   See the License for the specific language governing permissions and
   limitations under the License.
*/
package com.ebay.xcelite;




/**
 * Class description...
 * 
 * @author kharel (kharel@ebay.com)
 * @creation_date Nov 9, 2013
 * 
 */
public class Xcelite {

  private final Workbook workbook;
  private File file;

  public Xcelite() {
    workbook = new XSSFWorkbook();
  }

  public Xcelite(File file) {
    try {
      this.file = file;
      workbook = new XSSFWorkbook(new FileInputStream(file));
    } catch (FileNotFoundException e) {
      throw new RuntimeException(e);
    } catch (IOException e) {
      throw new RuntimeException(e);
    }
  }

  /**
   * Creates new sheet.
   * 
   * @return XceliteSheet object
   */

// Path: src/main/java/com/ebay/xcelite/exceptions/XceliteException.java
// public class XceliteException extends RuntimeException {
// 
//   private static final long serialVersionUID = 1L;
// 
//   public XceliteException(String message) {
//     super(message);
//   }
// 
//   public XceliteException(Exception exception) {
//     super(exception);
//   }
// 
//   public XceliteException(String message, Exception exception) {
//     super(message, exception);
//   }
// }
// 
// Path: src/main/java/com/ebay/xcelite/sheet/XceliteSheet.java
// public interface XceliteSheet {
// 
//   <T> SheetWriter<T> getBeanWriter(Class<T> type);
//   <T> SheetReader<T> getBeanReader(Class<T> type);
//   SheetWriter<Collection<Object>> getSimpleWriter();
//   SheetReader<Collection<Object>> getSimpleReader();
//   Sheet getNativeSheet();
//   File getFile();
// }
// 
// Path: src/main/java/com/ebay/xcelite/sheet/XceliteSheetImpl.java
// public class XceliteSheetImpl implements XceliteSheet {
// 
//   private final Sheet sheet;
//   private final File file;
// 
//   public XceliteSheetImpl(Sheet sheet) {
//     this(sheet, null);
//   }
//   
//   public XceliteSheetImpl(Sheet sheet, File file) {
//     this.sheet = sheet;
//     this.file = file;
//   }
//   
//   @Override
//   public Sheet getNativeSheet() {
//     return sheet;
//   }
// 
//   @Override
//   public File getFile() {
//     return file;
//   }
// 
//   @Override
//   public <T> SheetWriter<T> getBeanWriter(Class<T> type) {
//     return new BeanSheetWriter<T>(this, type);
//   }
// 
//   @Override
//   public <T> SheetReader<T> getBeanReader(Class<T> type) {
//     return new BeanSheetReader<T>(this, type);
//   } 
// 
//   @Override
//   public SimpleSheetWriter getSimpleWriter() {
//     return new SimpleSheetWriter(this);
//   }
// 
//   @Override
//   public SheetReader<Collection<Object>> getSimpleReader() {
//     return new SimpleSheetReader(this);
//   }
// }


// Path: src/main/java/com/ebay/xcelite/Xcelite.java
import java.io.ByteArrayOutputStream;
import java.io.File;
import java.io.FileInputStream;
import java.io.FileNotFoundException;
import java.io.FileOutputStream;
import java.io.IOException;
import org.apache.poi.ss.usermodel.Sheet;
import org.apache.poi.ss.usermodel.Workbook;
import org.apache.poi.xssf.usermodel.XSSFWorkbook;
import com.ebay.xcelite.exceptions.XceliteException;
import com.ebay.xcelite.sheet.XceliteSheet;
import com.ebay.xcelite.sheet.XceliteSheetImpl;

/*
  Copyright [2013-2014] eBay Software Foundation

   Licensed under the Apache License, Version 2.0 (the "License");
   you may not use this file except in compliance with the License.
   You may obtain a copy of the License at

       http://www.apache.org/licenses/LICENSE-2.0

   Unless required by applicable law or agreed to in writing, software
   distributed under the License is distributed on an "AS IS" BASIS,
   WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
   See the License for the specific language governing permissions and
   limitations under the License.
*/
package com.ebay.xcelite;




/**
 * Class description...
 * 
 * @author kharel (kharel@ebay.com)
 * @creation_date Nov 9, 2013
 * 
 */
public class Xcelite {

  private final Workbook workbook;
  private File file;

  public Xcelite() {
    workbook = new XSSFWorkbook();
  }

  public Xcelite(File file) {
    try {
      this.file = file;
      workbook = new XSSFWorkbook(new FileInputStream(file));
    } catch (FileNotFoundException e) {
      throw new RuntimeException(e);
    } catch (IOException e) {
      throw new RuntimeException(e);
    }
  }

  /**
   * Creates new sheet.
   * 
   * @return XceliteSheet object
   */

  public XceliteSheet createSheet() {
