|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectjava.io.OutputStream
org.basex.io.DataOutput
public final class DataOutput
This is an output stream for project specific data types.
Constructor Summary | |
---|---|
DataOutput(java.io.OutputStream out)
Constructor writing to an output stream. |
|
DataOutput(java.lang.String db,
java.lang.String fn)
Convenience constructor. |
|
DataOutput(java.lang.String db,
java.lang.String fn,
int bufs)
Convenience constructor with a specified buffer size. |
Method Summary | |
---|---|
void |
close()
|
void |
flush()
|
long |
size()
Return the number of written bytes. |
void |
write(int b)
|
void |
write1(int v)
Writes an integer value to the specified output stream. |
void |
write2(int v)
Writes an integer value to the specified output stream. |
void |
write5(long v)
Writes an integer value to the specified output stream. |
void |
writeBool(boolean b)
Writes a boolean value to the output stream. |
void |
writeBooleans(boolean[] array)
Writes the specified array to the output stream. |
int |
writeBytes(byte[] text)
Writes the specified array to the output stream. |
void |
writeBytesArray(byte[][] array)
Writes the specified array to the output stream; null references are replaced with an empty array. |
void |
writeInt(int v)
Writes an integer value to the specified output stream. |
int |
writeNum(int v)
Compresses and writes an integer value to the specified output stream. |
void |
writeNums(int[] array)
Writes the specified array to the output stream. |
void |
writeString(java.lang.String s)
Writes a string to the output stream. |
Methods inherited from class java.io.OutputStream |
---|
write, write |
Methods inherited from class java.lang.Object |
---|
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public DataOutput(java.io.OutputStream out)
out
- Output Stream to operate onpublic DataOutput(java.lang.String db, java.lang.String fn) throws java.io.IOException
db
- name of the databasefn
- File to write to
java.io.IOException
- in case of write errorspublic DataOutput(java.lang.String db, java.lang.String fn, int bufs) throws java.io.IOException
db
- name of the databasefn
- name of the file to write tobufs
- size of the buffer to use
java.io.IOException
- in case of write errorsMethod Detail |
---|
public void write(int b) throws java.io.IOException
write
in class java.io.OutputStream
java.io.IOException
public void writeBool(boolean b) throws java.io.IOException
b
- boolean value
java.io.IOException
- in case of write errorspublic void writeString(java.lang.String s) throws java.io.IOException
s
- string
java.io.IOException
- in case of write errorspublic int writeBytes(byte[] text) throws java.io.IOException
text
- array to be written
java.io.IOException
- in case of write errorspublic void writeBooleans(boolean[] array) throws java.io.IOException
array
- array to be written
java.io.IOException
- in case of write errorspublic void writeBytesArray(byte[][] array) throws java.io.IOException
array
- array to be written
java.io.IOException
- in case of write errorspublic void writeNums(int[] array) throws java.io.IOException
array
- array to be written
java.io.IOException
- in case of write errorspublic int writeNum(int v) throws java.io.IOException
v
- value to be written
java.io.IOException
- in case of write errorspublic void writeInt(int v) throws java.io.IOException
v
- value to be written
java.io.IOException
- in case of write errorspublic void write1(int v) throws java.io.IOException
v
- value to be written
java.io.IOException
- in case of write errorspublic void write2(int v) throws java.io.IOException
v
- value to be written
java.io.IOException
- in case of write errorspublic void write5(long v) throws java.io.IOException
v
- value to be written
java.io.IOException
- in case of write errorspublic long size()
public void flush() throws java.io.IOException
flush
in interface java.io.Flushable
flush
in class java.io.OutputStream
java.io.IOException
public void close() throws java.io.IOException
close
in interface java.io.Closeable
close
in class java.io.OutputStream
java.io.IOException
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |