git-svn-id: https://svn.apache.org/repos/asf/jakarta/poi/trunk@352814 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
Andrew C. Oliver 2002-07-28 22:54:43 +00:00
parent 4756c85ce8
commit 7c96ffd3b9
1 changed files with 3 additions and 25 deletions

View File

@ -70,7 +70,6 @@ import java.io.ByteArrayInputStream;
import java.io.IOException;
import java.io.InputStream;
import java.io.OutputStream;
import java.io.UnsupportedEncodingException;
import java.util.ArrayList;
import java.util.List;
@ -83,7 +82,6 @@ import java.util.List;
* @see org.apache.poi.hssf.usermodel.HSSFSheet
* @author Andrew C. Oliver (acoliver at apache dot org)
* @author Glen Stampoultzis (glens at apache.org)
* @author Sergei Kozello (sergeikozello at mail.ru)
* @version 2.0-pre
*/
@ -203,10 +201,6 @@ public class HSSFWorkbook
// none currently
}
public final static byte ENCODING_COMPRESSED_UNICODE = 0;
public final static byte ENCODING_UTF_16 = 1;
/**
* set the sheet name.
* @param sheet number (0 based)
@ -214,28 +208,12 @@ public class HSSFWorkbook
*/
public void setSheetName(int sheet, String name)
{
workbook.setSheetName( sheet, name, ENCODING_COMPRESSED_UNICODE );
}
public void setSheetName( int sheet, String name, short encoding )
{
if (sheet > (sheets.size() - 1))
{
throw new RuntimeException("Sheet out of bounds");
}
switch ( encoding ) {
case ENCODING_COMPRESSED_UNICODE:
case ENCODING_UTF_16:
break;
default:
// TODO java.io.UnsupportedEncodingException
throw new RuntimeException( "Unsupported encoding" );
}
workbook.setSheetName( sheet, name, encoding );
workbook.setSheetName(sheet, name);
}
/**