FileDocument Class

DEPRECATED

com.bea.p13n.content.document.ref
FileDocument Class

public class FileDocument

    extends Object
    implements com.bea.p13n.content.document.spi.DocumentDef

A concreate implementation of a document which uses a file.


Hierarchy
Object
  FileDocument
All Implemented Interfaces

com.bea.p13n.content.document.spi.DocumentDef

Field Summary

protected File
file
The file object we read from.
 

Constructor Summary

FileDocument(File file)

Constructor.
 

Method Summary

public byte[]
getBytes()
Get the bytes of the file.
public File
getFile()
Get the file used.
public InputStream
openStream()
Open a sream to the bytes of the file.
public void
setFile(File file)
Set the file used.
 
Methods from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
   
Methods from interface com.bea.p13n.content.document.spi.com.bea.p13n.content.document.spi.DocumentDef
getBytes, openStream
 

Field Detail

file

protected File file
The file object we read from.

 

Constructor Detail

FileDocument

public FileDocument(File file)
Constructor.
 

Method Detail

getBytes() Method

public byte[] getBytes()
throws DocumentException
Get the bytes of the file.

Returns

the raw bytes of the document.

Exceptions

DocumentException

getFile() Method

public File getFile()
Get the file used.


openStream() Method

public InputStream openStream()
throws DocumentException
Open a sream to the bytes of the file.

Returns

an input stream to the bytes.

Exceptions

DocumentException

setFile(File) Method

public void setFile(File file)
Set the file used.