| |
|
| java.lang.Object java.io.OutputStream java.io.DataOutputStream com.sun.cdc.io.GeneralBase
All known Subclasses: com.sun.cdc.io.ConnectionBase,
GeneralBase | abstract public class GeneralBase extends DataOutputStream implements DataInput,DataOutput(Code) | | Base class for objects that implement the DataInput and DataOutput interfaces.
It also behaves like a DataOutputStream so it can be used for UniversalOutputStream
version: 1.1 2/20/2000 |
Method Summary | |
public void | close() Close the stream. | public void | flush() Flush the stream. | public int | read() Reads the next byte of data from the input stream. | public boolean | readBoolean() See the general contract of the readBoolean
method of DataInput . | public byte | readByte() See the general contract of the readByte
method of DataInput . | public char | readChar() See the general contract of the readChar
method of DataInput . | public double | readDouble() | public float | readFloat() | public void | readFully(byte b) See the general contract of the readFully
method of DataInput . | public void | readFully(byte b, int off, int len) See the general contract of the readFully
method of DataInput . | public int | readInt() See the general contract of the readInt
method of DataInput . | public String | readLine() | public long | readLong() See the general contract of the readLong
method of DataInput . | public short | readShort() See the general contract of the readShort
method of DataInput . | public String | readUTF() See the general contract of the readUTF
method of DataInput . | public int | readUnsignedByte() See the general contract of the readUnsignedByte
method of DataInput . | public int | readUnsignedShort() See the general contract of the readUnsignedShort
method of DataInput . | public long | skip(long n) Skips over and discards n bytes of data from this input
stream. | public int | skipBytes(int n) See the general contract of the skipBytes
method of DataInput .
Bytes
for this operation are read from the contained
input stream.
Parameters: n - the number of bytes to be skipped. | public void | write(int b) Writes the specified byte (the low eight bits of the argument
b ) to the underlying output stream. | public void | write(byte b, int off, int len) Writes len bytes from the specified byte array
starting at offset off to the underlying output stream. |
GeneralBase | public GeneralBase()(Code) | | |
read | public int read() throws IOException(Code) | | Reads the next byte of data from the input stream. The value byte is
returned as an int in the range 0 to
255 . If no byte is available because the end of the stream
has been reached, the value -1 is returned. This method
blocks until input data is available, the end of the stream is detected,
or an exception is thrown.
A subclass must provide an implementation of this method.
the next byte of data, or -1 if the end of thestream is reached. exception: IOException - if an I/O error occurs. |
readBoolean | public boolean readBoolean() throws IOException(Code) | | See the general contract of the readBoolean
method of DataInput .
Bytes
for this operation are read from the contained
input stream.
the boolean value read. exception: EOFException - if this input stream has reached the end. |
readByte | public byte readByte() throws IOException(Code) | | See the general contract of the readByte
method of DataInput .
Bytes
for this operation are read from the contained
input stream.
the next byte of this input stream as a signed 8-bitbyte . exception: EOFException - if this input stream has reached the end. exception: IOException - if an I/O error occurs. |
readChar | public char readChar() throws IOException(Code) | | See the general contract of the readChar
method of DataInput .
Bytes
for this operation are read from the contained
input stream.
the next two bytes of this input stream as a Unicodecharacter. exception: EOFException - if this input stream reaches the end beforereading two bytes. exception: IOException - if an I/O error occurs. |
readFully | public void readFully(byte b) throws IOException(Code) | | See the general contract of the readFully
method of DataInput .
Bytes
for this operation are read from the contained
input stream.
Parameters: b - the buffer into which the data is read. exception: EOFException - if this input stream reaches the end beforereading all the bytes. exception: IOException - if an I/O error occurs. |
readFully | public void readFully(byte b, int off, int len) throws IOException(Code) | | See the general contract of the readFully
method of DataInput .
Bytes
for this operation are read from the contained
input stream.
Parameters: b - the buffer into which the data is read. Parameters: off - the start offset of the data. Parameters: len - the number of bytes to read. exception: EOFException - if this input stream reaches the end beforereading all the bytes. exception: IOException - if an I/O error occurs. |
readInt | public int readInt() throws IOException(Code) | | See the general contract of the readInt
method of DataInput .
Bytes
for this operation are read from the contained
input stream.
the next four bytes of this input stream, interpreted as anint . exception: EOFException - if this input stream reaches the end beforereading four bytes. exception: IOException - if an I/O error occurs. |
readLong | public long readLong() throws IOException(Code) | | See the general contract of the readLong
method of DataInput .
Bytes
for this operation are read from the contained
input stream.
the next eight bytes of this input stream, interpreted as along . exception: EOFException - if this input stream reaches the end beforereading eight bytes. exception: IOException - if an I/O error occurs. |
readShort | public short readShort() throws IOException(Code) | | See the general contract of the readShort
method of DataInput .
Bytes
for this operation are read from the contained
input stream.
the next two bytes of this input stream, interpreted as asigned 16-bit number. exception: EOFException - if this input stream reaches the end beforereading two bytes. exception: IOException - if an I/O error occurs. |
readUnsignedByte | public int readUnsignedByte() throws IOException(Code) | | See the general contract of the readUnsignedByte
method of DataInput .
Bytes
for this operation are read from the contained
input stream.
the next byte of this input stream, interpreted as anunsigned 8-bit number. exception: EOFException - if this input stream has reached the end. exception: IOException - if an I/O error occurs. |
readUnsignedShort | public int readUnsignedShort() throws IOException(Code) | | See the general contract of the readUnsignedShort
method of DataInput .
Bytes
for this operation are read from the contained
input stream.
the next two bytes of this input stream, interpreted as anunsigned 16-bit integer. exception: EOFException - if this input stream reaches the end beforereading two bytes. exception: IOException - if an I/O error occurs. |
skip | public long skip(long n) throws IOException(Code) | | Skips over and discards n bytes of data from this input
stream. The skip method may, for a variety of reasons, end
up skipping over some smaller number of bytes, possibly 0 .
This may result from any of a number of conditions; reaching end of file
before n bytes have been skipped is only one possibility.
The actual number of bytes skipped is returned. If n is
negative, no bytes are skipped.
The skip method of InputStream creates a
byte array and then repeatedly reads into it until n bytes
have been read or the end of the stream has been reached. Subclasses are
encouraged to provide a more efficient implementation of this method.
Parameters: n - the number of bytes to be skipped. the actual number of bytes skipped. exception: IOException - if an I/O error occurs. |
skipBytes | public int skipBytes(int n) throws IOException(Code) | | See the general contract of the skipBytes
method of DataInput .
Bytes
for this operation are read from the contained
input stream.
Parameters: n - the number of bytes to be skipped. the actual number of bytes skipped. exception: IOException - if an I/O error occurs. |
write | public void write(int b) throws IOException(Code) | | Writes the specified byte (the low eight bits of the argument
b ) to the underlying output stream. If no exception
is thrown, the counter written is incremented by
1 .
Implements the write method of OutputStream .
Parameters: b - the byte to be written. exception: IOException - if an I/O error occurs. See Also: java.io.FilterOutputStream.out |
write | public void write(byte b, int off, int len) throws IOException(Code) | | Writes len bytes from the specified byte array
starting at offset off to the underlying output stream.
If no exception is thrown, the counter written is
incremented by len .
Parameters: b - the data. Parameters: off - the start offset in the data. Parameters: len - the number of bytes to write. exception: IOException - if an I/O error occurs. See Also: java.io.FilterOutputStream.out |
|
|
|