com.beasys.commerce.axiom.document.ref
Class FileDocument
java.lang.Object
|
+--com.beasys.commerce.axiom.document.ref.FileDocument
- public class FileDocument
- extends java.lang.Object
- implements DocumentDef
A concreate implementation of a document which uses a file.
Field Summary |
protected java.io.File |
file
The file object we read from. |
Constructor Summary |
FileDocument(java.io.File file)
Constructor. |
Method Summary |
byte[] |
getBytes()
Get the bytes of the file. |
java.io.File |
getFile()
Get the file used. |
java.io.InputStream |
openStream()
Open a sream to the bytes of the file. |
void |
setFile(java.io.File file)
Set the file used. |
Methods inherited from class java.lang.Object |
clone,
equals,
finalize,
getClass,
hashCode,
notify,
notifyAll,
toString,
wait,
wait,
wait |
file
protected java.io.File file
- The file object we read from.
FileDocument
public FileDocument(java.io.File file)
- Constructor.
getFile
public java.io.File getFile()
- Get the file used.
setFile
public void setFile(java.io.File file)
- Set the file used.
getBytes
public byte[] getBytes()
throws DocumentException
- Get the bytes of the file.
- Specified by:
- getBytes in interface DocumentDef
- Tags copied from interface: DocumentDef
- Returns:
- the raw bytes of the document.
- Throws:
- DocumentException - thrown on an error.
openStream
public java.io.InputStream openStream()
throws DocumentException
- Open a sream to the bytes of the file.
- Specified by:
- openStream in interface DocumentDef
- Tags copied from interface: DocumentDef
- Returns:
- an input stream to the bytes.
- Throws:
- DocumentException - thrown on an error.
Copyright © 2000 BEA Systems, Inc. All Rights Reserved