Overview | Package | Class | Tree | Deprecated | Index | Help
| © 2002 BEA Systems, Inc.
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

## com.bea.p13n.content.document.ref
Class DefaultDocument

    java.lang.Object
      |
      +--com.bea.p13n.content.document.ref.DefaultDocument

public class DefaultDocument
extends java.lang.Object
implements DocumentDef

A concreate DocumentDef that takes an array of bytes.

Field Summary
`protected byte[]` | `data` The raw data.

Constructor Summary
`DefaultDocument(byte[] data)` Constructor from a byte array.
`DefaultDocument(java.io.InputStream in)` Constructor from an input stream.

Method Summary
`static void` | `close(java.io.InputStream in)` Close an input stream and ignore any exception.
`byte[]` | `getBytes()` Get the bytes of the document.
`java.io.InputStream` | `openStream()` Open an input stream to the bytes of the document.
`static byte[]` | `readFully(java.io.InputStream in)` Fully read an input stream and return the resulting bytes.
`void` | `setBytes(byte[] data)` Set the bytes of the document.

Methods inherited from class java.lang.Object
`clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

Field Detail

### data

    protected byte[] data

  The raw data.

Constructor Detail

### DefaultDocument

    public DefaultDocument(byte[] data)

  Constructor from a byte array.

### DefaultDocument

    public DefaultDocument(java.io.InputStream in)
                    throws java.io.IOException

  Constructor from an input stream.

Method Detail

### getBytes

    public byte[] getBytes()

  Get the bytes of the document.
  Specified by:
    getBytes in interface DocumentDef

### setBytes

    public void setBytes(byte[] data)

  Set the bytes of the document.

### openStream

    public java.io.InputStream openStream()
                                   throws DocumentException

  Open an input stream to the bytes of the document.
  Specified by:
    openStream in interface DocumentDef

### readFully

    public static byte[] readFully(java.io.InputStream in)
                            throws java.io.IOException

  Fully read an input stream and return the resulting bytes.

### close

    public static void close(java.io.InputStream in)

  Close an input stream and ignore any exception.

Overview | Package | Class | Tree | Deprecated | Index | Help
| © 2002 BEA Systems, Inc.
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

Copyright © 2002 BEA Systems, Inc. All Rights Reserved