|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.apache.derby.iapi.services.io.InputStreamUtil
Utility methods for InputStream that are stand-ins for a small subset of DataInput methods. This avoids pushing a DataInputStream just to get this functionality.
Constructor Summary | |
InputStreamUtil()
|
Method Summary | |
static void |
readFully(java.io.InputStream in,
byte[] b,
int offset,
int len)
Read a number of bytes into an array. |
static int |
readLoop(java.io.InputStream in,
byte[] b,
int offset,
int len)
Read a number of bytes into an array. |
static int |
readUnsignedByte(java.io.InputStream in)
Read an unsigned byte from an InputStream, throwing an EOFException if the end of the input is reached. |
static long |
skipBytes(java.io.InputStream in,
long n)
Skip a number of bytes in the stream. |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
public InputStreamUtil()
Method Detail |
public static int readUnsignedByte(java.io.InputStream in) throws java.io.IOException
java.io.IOException
- if an I/O error occurs.
java.io.EOFException
- if the end of the stream is reachedDataInput.readUnsignedByte()
public static void readFully(java.io.InputStream in, byte[] b, int offset, int len) throws java.io.IOException
java.io.IOException
- if an I/O error occurs.
java.io.EOFException
- if the end of the stream is reachedDataInput.readFully(byte[])
public static int readLoop(java.io.InputStream in, byte[] b, int offset, int len) throws java.io.IOException
java.io.IOException
- if an I/O error occurs.public static long skipBytes(java.io.InputStream in, long n) throws java.io.IOException
java.io.IOException
- if an I/O error occurs.
java.io.EOFException
- if the end of the stream is reachedDataInput.skipBytes(int)
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |