|
|||||||||
| 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 underlying. |
|
| Method Summary | |
|---|---|
void |
close()
|
void |
flush()
|
int |
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. |
void |
writeBytes(byte[] array)
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 |
writeBytesArrayFlat(byte[][] array)
Writes the specified array to the output stream; null references are replaced with an empty array. |
void |
writeBytesFlat(byte[] array)
Writes the specified array to the output stream. |
void |
writeInt(int v)
Writes an integer value to the specified output stream. |
void |
writeIntArray(int[][] array)
Writes the specified array to the output stream; null references are replaced with an empty array. |
void |
writeInts(int[] array)
Writes the specified array to the 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 |
writeNumsArray(int[][] array)
Writes the specified array to the output stream; null references are replaced with an empty array. |
void |
writeString(java.lang.String s)
Writes a string to the output stream. |
void |
writeStructureWithOffsets(int[] array)
Writes the specifies array to output stream as follows. |
int |
writeToken(byte[] text)
Finishes the file. |
| 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 on
public 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 errors
public 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 errors| Method Detail |
|---|
public void close()
throws java.io.IOException
close in interface java.io.Closeableclose in class java.io.OutputStreamjava.io.IOException
public void flush()
throws java.io.IOException
flush in interface java.io.Flushableflush in class java.io.OutputStreamjava.io.IOExceptionpublic int size()
public void write(int b)
throws java.io.IOException
write in class java.io.OutputStreamjava.io.IOException
public void write1(int v)
throws java.io.IOException
v - value to be written
java.io.IOException - in case of write errors
public void write2(int v)
throws java.io.IOException
v - value to be written
java.io.IOException - in case of write errors
public void write5(long v)
throws java.io.IOException
v - value to be written
java.io.IOException - in case of write errors
public void writeBool(boolean b)
throws java.io.IOException
b - boolean value
java.io.IOException - in case of write errors
public void writeBooleans(boolean[] array)
throws java.io.IOException
array - array to be written
java.io.IOException - in case of write errors
public void writeBytes(byte[] array)
throws java.io.IOException
array - array to be written
java.io.IOException - in case of write errors
public void writeBytesArray(byte[][] array)
throws java.io.IOException
array - array to be written
java.io.IOException - in case of write errors
public void writeBytesArrayFlat(byte[][] array)
throws java.io.IOException
array - array to be written
java.io.IOException - in case of write errors
public void writeBytesFlat(byte[] array)
throws java.io.IOException
array - array to be written
java.io.IOException - in case of write errors
public void writeInt(int v)
throws java.io.IOException
v - value to be written
java.io.IOException - in case of write errors
public void writeIntArray(int[][] array)
throws java.io.IOException
array - array to be written
java.io.IOException - in case of write errors
public void writeInts(int[] array)
throws java.io.IOException
array - array to be written
java.io.IOException - in case of write errors
public int writeNum(int v)
throws java.io.IOException
v - value to be written
java.io.IOException - in case of write errors
public void writeNums(int[] array)
throws java.io.IOException
array - array to be written
java.io.IOException - in case of write errors
public void writeNumsArray(int[][] array)
throws java.io.IOException
array - array to be written
java.io.IOException - in case of write errors
public void writeString(java.lang.String s)
throws java.io.IOException
s - string
java.io.IOException - in case of write errors
public void writeStructureWithOffsets(int[] array)
throws java.io.IOException
array - inputarray
java.io.IOException - in case of wrtie errors
public int writeToken(byte[] text)
throws java.io.IOException
text - text to be written
java.io.IOException - in case of write errors
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||