DefaultDocument Class
DEPRECATED
- public class DefaultDocument
extends Object
implements com.bea.p13n.content.document.spi.DocumentDef
A concreate DocumentDef that takes an array of bytes.
-
Hierarchy
-
Object
DefaultDocument
-
All Implemented Interfaces
-
com.bea.p13n.content.document.spi.DocumentDef
protected byte |
-
data
- The raw data.
|
public static void |
-
close (InputStream in)
- Close an input stream and ignore any exception.
|
public byte[] |
-
getBytes ()
- Get the bytes of the document.
|
public InputStream |
-
openStream ()
- Open an input stream to the bytes of the document.
|
public static byte[] |
-
readFully (InputStream in)
- Fully read an input stream and return the resulting bytes.
|
public void |
-
setBytes (byte[] data)
- Set the bytes of the document.
|
Methods from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
data
protected byte data
- The raw data.
DefaultDocument
public DefaultDocument(byte[] data)
- Constructor from a byte array.
DefaultDocument
public DefaultDocument(InputStream
in)
- Constructor from an input stream.
close(InputStream) Method
public static void close(InputStream
in)
Close an input stream and ignore any exception.
getBytes() Method
public byte[] getBytes()
Get the bytes of the document.
Returns
- the raw bytes of the document.
openStream() Method
public InputStream
openStream()
throws DocumentException
Open an input stream to the bytes of the document.
Returns
- an input stream to the bytes.
Exceptions
-
DocumentException
readFully(InputStream) Method
public static byte[] readFully(InputStream
in)
throws IOException
Fully read an input stream and return the resulting bytes.
Exceptions
-
IOException
setBytes(byte[]) Method
public void setBytes(byte[] data)
Set the bytes of the document.