|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectcom.extentech.ExtenXLS.DocumentHandle
public abstract class DocumentHandle
Functionality common to all document types.
| Field Summary | |
|---|---|
static int |
FORMAT_NATIVE
Format constant for the most appropriate format for this document. |
| Fields inherited from interface com.extentech.ExtenXLS.Document |
|---|
DEBUG_HIGH, DEBUG_LOW, DEBUG_MEDIUM |
| Constructor Summary | |
|---|---|
DocumentHandle()
default constructor |
|
DocumentHandle(InputStream urlx)
Apr 5, 2011 |
|
| Method Summary | |
|---|---|
void |
addProperty(String name,
Object val)
Sets the value of a property in the workbook property store. |
File |
getFile()
Gets the file associated with this document. |
abstract String |
getFileExtension()
Gets the file name extension for this document's native format. |
String |
getFileName()
Deprecated. Use getFile() instead. |
abstract int |
getFormat()
Gets the constant representing this document's native format. |
static DocumentHandle |
getInstance(InputStream input)
Looks for magic numbers in the given input data and attempts to parse it with an appropriate DocumentHandle subclass. |
String |
getName()
Gets the user-visible descriptive name or title of this document. |
Map<String,Object> |
getProperties()
Retrieves a Map containing the workbook properties store. |
Object |
getProperty(String name)
Retrieves a property in the workbook property store. |
static String |
getVersion()
Gets the ExtenXLS version number. |
abstract void |
reset()
Resets the document state to what it was when it was loaded. |
void |
setDebugLevel(int level)
Sets the debugging output level. |
void |
setFile(File file)
Sets the file associated with this document. |
void |
setFileName(String name)
Deprecated. Use setFile(File) instead. |
void |
setName(String nm)
Sets the user-visible descriptive name or title of this document. |
void |
setProperties(Map<String,Object> properties)
Replaces the workbook properties with the values in a given Map. |
String |
toString()
Returns a string representation of the object. |
void |
write(File file)
Writes the document to the given file in its native format. |
void |
write(File file,
int format)
Writes the document to the given file in the requested format. |
void |
write(OutputStream dest)
Writes the document to the given stream in its native format. |
abstract void |
write(OutputStream dest,
int format)
Writes the document to the given stream in the requested format. |
| Methods inherited from class java.lang.Object |
|---|
equals, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Methods inherited from interface java.io.Closeable |
|---|
close |
| Field Detail |
|---|
public static final int FORMAT_NATIVE
| Constructor Detail |
|---|
public DocumentHandle()
public DocumentHandle(InputStream urlx)
urlx - | Method Detail |
|---|
public Object getProperty(String name)
getProperty in interface Documentname - the name of the property to retrieve
public void addProperty(String name,
Object val)
addProperty in interface Documentname - the name of the property which should be updatedvalue - the value to which the property should be setpublic Map<String,Object> getProperties()
public void setProperties(Map<String,Object> properties)
properties - the values that will replace the existing propertiespublic static String getVersion()
public void setName(String nm)
setName in interface Documentpublic void setFileName(String name)
setFile(File) instead.
public void setFile(File file)
public File getFile()
null.
public static DocumentHandle getInstance(InputStream input)
throws IOException
DocumentHandle subclass. Detection
is performed on a best-effort basis and is not guaranteed to be accurate.
IOException - if an error occurs while reading from the stream
WorkBookException - if parsing failspublic String getFileName()
getFile() instead.
null.
public void setDebugLevel(int level)
setDebugLevel in interface Documentpublic String getName()
getName in interface Documentpublic abstract void reset()
reset in interface DocumentUnsupportedOperationException - if there is not sufficient data
available to perform the reversionpublic abstract int getFormat()
public abstract String getFileExtension()
public abstract void write(OutputStream dest,
int format)
throws IOException
dest - the stream to which the document should be writtenformat - the constant representing the desired output format
IllegalArgumentException - if the given type code is invalid
IOException - if an error occurs while writing to the stream
public void write(OutputStream dest)
throws IOException
dest - the stream to which the document should be written
IOException - if an error occurs while writing to the stream
public void write(File file,
int format)
throws IOException
file - the path to which the document should be writtenformat - the constant representing the desired output format
IllegalArgumentException - if the given type code is invalid
IOException - if an error occurs while writing to the file
public void write(File file)
throws IOException
file - the path to which the document should be written
IOException - if an error occurs while writing to the streampublic String toString()
getName().
toString in class Object
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||