public abstract class DataInputOutputStream extends DataInputStream implements DataOutput
Constructor and Description |
---|
DataInputOutputStream() |
Modifier and Type | Method and Description |
---|---|
void |
copyFrom(DataInput in,
int length)
Copies bytes of a given length from input stream.
|
abstract int |
directRead(long from,
byte[] arr)
Read from the offset position without buffering.
|
abstract void |
directWrite(long at,
byte[] buf) |
void |
printUTFS(String str,
int firstIndex,
int lastIndex)
Prints a string portion.
|
abstract byte |
readByte()
Description of the Method
|
abstract int |
readFully(byte[] arr)
Description of the Method
|
abstract void |
write(byte[] buf,
int offset,
int len) |
void |
writeBoolean(boolean value) |
abstract void |
writeByte(int val)
Write the given byte, which will be converted to Pack7 format.
|
void |
writeFully(byte[] buf)
Description of the Method
|
void |
writeInt(int val)
Description of the Method
|
void |
writeLong(long val)
Description of the Method
|
void |
writePack7(long val)
Write the given long, which will be converted to Pack7 format.
|
void |
writePack7I(int val)
Write the given integer, which will be converted to Pack7 format.
|
void |
writeShort(int val)
Description of the Method
|
void |
writeString(int from,
String str)
Write a string as length (pack7) followed by UTF code of the
string.
|
abstract long |
written() |
close, getFilePointer, getMarkPointer, jump, length, mark, read, readBoolean, readInt, readLong, readPack7, readPack7I, readShort, readString, readString, seek, skipBytes, skipPack7, skipPack7I
public final void writeFully(byte[] buf) throws IOException
DataOutput
writeFully
in interface DataOutput
buf
- Description of the ParameterIOException
- Description of the Exceptionpublic abstract long written()
written
in interface DataOutput
public abstract void writeByte(int val) throws IOException
DataOutput
writeByte
in interface DataOutput
val
- the long to convert and writeIOException
- if an I/O error occurspublic void writeLong(long val) throws IOException
DataOutput
writeLong
in interface DataOutput
val
- Description of the ParameterIOException
- Description of the Exceptionpublic void writeInt(int val) throws IOException
writeInt
in interface DataOutput
val
- Description of the ParameterIOException
- Description of the Exceptionpublic void writeShort(int val) throws IOException
writeShort
in interface DataOutput
val
- Description of the ParameterIOException
- Description of the Exceptionpublic abstract void write(byte[] buf, int offset, int len) throws IOException
write
in interface DataOutput
IOException
public final void writePack7(long val) throws IOException
DataOutput
writePack7
in interface DataOutput
val
- the long to convert and writeIOException
- if an I/O error occurspublic final void writePack7I(int val) throws IOException
DataOutput
writePack7I
in interface DataOutput
val
- the integer to convert and writeIOException
- if an I/O error occurspublic void writeString(int from, String str) throws IOException
writeString
in interface DataOutput
from
- Description of the Parameterstr
- Description of the ParameterIOException
- Description of the Exceptionpublic void writeBoolean(boolean value) throws IOException
writeBoolean
in interface DataOutput
IOException
public abstract byte readByte() throws IOException
DataInputStream
readByte
in interface DataInput
readByte
in class DataInputStream
IOException
- Description of the Exceptionpublic abstract int readFully(byte[] arr) throws IOException
DataInputStream
readFully
in interface DataInput
readFully
in class DataInputStream
arr
- Description of the ParameterIOException
- Description of the Exceptionpublic void printUTFS(String str, int firstIndex, int lastIndex) throws IOException
DataOutput
printUTFS
in interface DataOutput
str
- Description of the ParameterfirstIndex
- Description of the ParameterlastIndex
- Description of the ParameterIOException
- Description of the Exceptionpublic abstract int directRead(long from, byte[] arr) throws IOException
DataInput
directRead
in interface DataInput
directRead
in class DataInputStream
IOException
public abstract void directWrite(long at, byte[] buf) throws IOException
IOException
public void copyFrom(DataInput in, int length) throws IOException
DataOutput
copyFrom
in interface DataOutput
IOException
Copyright © 2016 Egothor. All Rights Reserved.