|
||||||||||
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(File db)
Convenience constructor. |
|
DataOutput(File db,
int bufs)
Convenience constructor with a specified buffer size. |
|
DataOutput(OutputStream out)
Constructor writing to an output stream. |
Method Summary | |
---|---|
void |
close()
|
void |
flush()
|
long |
size()
Returns 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. |
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. |
int |
writeDouble(double num)
Writes the specified array to the output stream. |
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(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(OutputStream out)
out
- Output Stream to operate onpublic DataOutput(File db) throws IOException
db
- name of the database
IOException
- I/O exceptionpublic DataOutput(File db, int bufs) throws IOException
db
- name of the databasebufs
- size of the buffer to use
IOException
- I/O exceptionMethod Detail |
---|
public void write(int b) throws IOException
write
in class OutputStream
IOException
public void writeBool(boolean b) throws IOException
b
- boolean value
IOException
- I/O exceptionpublic void writeString(String s) throws IOException
s
- string
IOException
- I/O exceptionpublic int writeBytes(byte[] text) throws IOException
text
- array to be written
IOException
- I/O exceptionpublic int writeDouble(double num) throws IOException
num
- array to be written
IOException
- I/O exceptionpublic void writeBytesArray(byte[][] array) throws IOException
array
- array to be written
IOException
- I/O exceptionpublic void writeNums(int[] array) throws IOException
array
- array to be written
IOException
- I/O exceptionpublic int writeNum(int v) throws IOException
v
- value to be written
IOException
- I/O exceptionpublic void writeInt(int v) throws IOException
v
- value to be written
IOException
- I/O exceptionpublic void write1(int v) throws IOException
v
- value to be written
IOException
- I/O exceptionpublic void write2(int v) throws IOException
v
- value to be written
IOException
- I/O exceptionpublic void write5(long v) throws IOException
v
- value to be written
IOException
- I/O exceptionpublic long size()
public void flush() throws IOException
flush
in interface Flushable
flush
in class OutputStream
IOException
public void close() throws IOException
close
in interface Closeable
close
in class OutputStream
IOException
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |