public class BinaryStream
extends java.lang.Object
Modifier and Type | Field and Description |
---|---|
static java.lang.String |
BINARY_FORMAT |
static int |
BUFSIZE |
static int |
NBUFFERS |
static java.lang.String |
SUN_FI |
static java.lang.String |
XDB_BINXML |
static java.lang.String |
XDK_CXML |
static java.lang.String |
XDK_XTI |
Modifier and Type | Method and Description |
---|---|
void |
close()
Closes data resoures allocated by this stream.
|
void |
closeAll()
Closes all resources associated with this stream.
|
void |
flush()
Flushes the stream.
|
void |
flushBuffer(byte[] buffer, int length)
Flush write buffer with given length and stop
|
void |
flushBuffer(byte[] buffer, int offset, int length)
Flush write buffer with given length and stop
|
void |
flushWriBuffer()
Flush the whole write buffer and continue
|
void |
flushWriBuffer(int length)
Flush write buffer with given length and stop
|
BinaryIndex |
getBinaryIndex()
Get the index
|
int |
getBufferSize()
Get the size of the buffer
|
byte[] |
getByteArray()
Get byte array
|
DTD |
getDTD()
Get DTD
|
java.lang.String |
getEncoding()
Get Encoding
|
InfosetReader |
getInfosetReader()
Get InfosetReader from the BinaryStream
|
InfosetWriter |
getInfosetWriter()
Get InfosetWriter from the BinaryStream
|
long |
getSize()
Get the size of the BinaryStream
|
java.lang.String |
getStandalone()
Get Standalone
|
java.lang.String |
getSystemId() |
java.util.Vector |
getTypeList()
Get typeList
|
java.lang.String |
getVersion()
Get Version
|
byte[] |
getWriteBuffer() |
java.io.OutputStream |
getWriteStream() |
boolean |
isIndexingSupported()
Check if indexing is supported
|
boolean |
isSeekSupported()
Check if the stream supports seek
|
byte[] |
load(int pageid, boolean forupdate) |
byte[] |
load(int pageid, int size, boolean forupdate) |
static BinaryStream |
newInstance(java.lang.String format)
Factory method to creat format specific BinaryStream
|
void |
reset() |
void |
setBlob(java.sql.Blob b)
Set a Blob as the binary source
|
void |
setByteArray(byte[] array)
Set byte array
|
void |
setDTD(DTD dtd)
Set DTD
|
void |
setEncoding(java.lang.String enc)
Set Encoding
|
void |
setFile(java.io.File f)
Set a file as the binary storage
|
void |
setInputStream(java.io.InputStream ois)
Set a InputStream to read data
|
void |
setOutputStream(java.io.OutputStream oos)
Set a OutputStream to write to
|
void |
setPageManager(PageManager pageMgr)
Set pageManager to cache binary, stream becomes seekable when source is InputStream.
|
void |
setStandalone(java.lang.String sda)
Set Standalone
|
void |
setSystemId(java.lang.String id) |
void |
setVersion(java.lang.String ver)
Set Version
|
void |
unload(int pageid, boolean forupdate, byte[] page) |
public static int NBUFFERS
public static int BUFSIZE
public static final java.lang.String BINARY_FORMAT
public static final java.lang.String XDK_CXML
public static final java.lang.String XDB_BINXML
public static final java.lang.String SUN_FI
public static final java.lang.String XDK_XTI
public static BinaryStream newInstance(java.lang.String format)
public InfosetReader getInfosetReader()
public InfosetWriter getInfosetWriter()
public boolean isIndexingSupported()
public BinaryIndex getBinaryIndex()
public long getSize()
public int getBufferSize()
public void setDTD(DTD dtd)
public DTD getDTD()
public void setEncoding(java.lang.String enc)
public java.lang.String getEncoding()
public void setStandalone(java.lang.String sda)
public java.lang.String getStandalone()
public void setVersion(java.lang.String ver)
public java.util.Vector getTypeList()
public boolean isSeekSupported()
public java.lang.String getVersion()
public void setOutputStream(java.io.OutputStream oos)
oos
- - OutputStream source streampublic void setBlob(java.sql.Blob b) throws java.io.IOException
b
- - Blob binary storagejava.io.IOException
public void setFile(java.io.File f) throws java.io.IOException
f
- - file for binary storagejava.io.IOException
public void setInputStream(java.io.InputStream ois)
ois
- - InputStream source streampublic void setByteArray(byte[] array)
array
- - Byte array for input and outputpublic byte[] getByteArray()
public void setPageManager(PageManager pageMgr)
pageMrg
- - PageManager to be used.public byte[] load(int pageid, boolean forupdate)
public byte[] load(int pageid, int size, boolean forupdate)
public void unload(int pageid, boolean forupdate, byte[] page)
public byte[] getWriteBuffer()
public java.io.OutputStream getWriteStream()
public void flushWriBuffer() throws java.io.IOException
java.io.IOException
public void flushWriBuffer(int length) throws java.io.IOException
java.io.IOException
public void flushBuffer(byte[] buffer, int length) throws java.io.IOException
java.io.IOException
public void flushBuffer(byte[] buffer, int offset, int length) throws java.io.IOException
java.io.IOException
public void flush() throws java.io.IOException
java.io.IOException
- If an I/O error has occurred.public void reset()
public void setSystemId(java.lang.String id)
public java.lang.String getSystemId()
public void close()
public void closeAll() throws java.io.IOException
java.io.IOException
- If an I/O error has occurred.