public class LoggedDataInputStream
extends java.io.FilterInputStream
Constructor and Description |
---|
LoggedDataInputStream(java.io.InputStream in)
Construct a logged stream using the specified underlying stream
|
Modifier and Type | Method and Description |
---|---|
void |
close()
Closes this input stream and releases any system resources associated
with the stream.
|
long |
getCounter() |
java.io.InputStream |
getUnderlyingStream() |
int |
read()
Interruptible read.
|
int |
read(byte[] b)
Reads up to byte.length bytes of data from this input stream into an
array of bytes.
|
int |
read(byte[] b,
int off,
int len)
Reads up to len bytes of data from this input stream into an array of
bytes
|
byte[] |
readBytes(int len)
Synchronously reads fixed chunk from the stream, logging it too.
|
java.lang.String |
readLine()
Deprecated.
It converts input data to string using
ByteArray.getStringFromBytes()
that works only for ASCII without 0. Use byte access methods instead. |
ByteArray |
readLineBytes() |
void |
setUnderlyingStream(java.io.InputStream is) |
long |
skip(long n) |
public LoggedDataInputStream(java.io.InputStream in)
in
- the streampublic java.lang.String readLine() throws java.io.IOException
ByteArray.getStringFromBytes()
that works only for ASCII without 0. Use byte access methods instead.java.io.IOException
public ByteArray readLineBytes() throws java.io.IOException
java.io.IOException
java.io.EOFException
- at stream endpublic byte[] readBytes(int len) throws java.io.IOException
len
- blocks until specifid number of bytes is read.java.io.IOException
public void close() throws java.io.IOException
close
in interface java.io.Closeable
close
in interface java.lang.AutoCloseable
close
in class java.io.FilterInputStream
java.io.IOException
public int read(byte[] b) throws java.io.IOException
read
in class java.io.FilterInputStream
java.io.IOException
public int read(byte[] b, int off, int len) throws java.io.IOException
read
in class java.io.FilterInputStream
java.io.IOException
public long skip(long n) throws java.io.IOException
skip
in class java.io.FilterInputStream
java.io.IOException
public int read() throws java.io.IOException
read
in class java.io.FilterInputStream
java.io.InterruptedIOException
- on thread interruptjava.io.IOException
public java.io.InputStream getUnderlyingStream()
public void setUnderlyingStream(java.io.InputStream is)
public long getCounter()
Built on January 12 2013. | Portions Copyright 1997-2005 Sun Microsystems, Inc. All rights reserved.