public class StreamUtils extends Object
| Constructor and Description |
|---|
StreamUtils() |
| Modifier and Type | Method and Description |
|---|---|
static double[] |
readDoubleArray(DataInput stream,
int len) |
static int |
readUnsignedShort(ByteBuffer bb)
See the general contract of the
readUnsignedShort method of DataInput. |
static String |
readUTF(ByteBuffer bb)
Reads from the bytebuffer
bb a representation of a Unicode character string encoded in modified UTF-8 format; this string of characters is then returned as a
String. |
static void |
writeDoubleArray(DataOutput stream,
double[] data) |
public static double[] readDoubleArray(DataInput stream, int len) throws IOException
IOExceptionpublic static void writeDoubleArray(DataOutput stream, double[] data) throws IOException
IOExceptionpublic static String readUTF(ByteBuffer bb) throws BufferUnderflowException, UTFDataFormatException
bb a representation of a Unicode character string encoded in modified UTF-8 format; this string of characters is then returned as a
String. The details of the modified UTF-8 representation are exactly the same as for the readUTF
method of DataInput.bb - a byte buffer.BufferUnderflowException - if the input stream reaches the end before all the bytes.UTFDataFormatException - if the bytes do not represent a valid modified UTF-8 encoding of a Unicode string.DataInputStream.readUnsignedShort()public static int readUnsignedShort(ByteBuffer bb) throws BufferUnderflowException
readUnsignedShort method of DataInput.
Bytes for this operation are read from the given byte buffer
bb - bbBufferUnderflowException - if this input stream reaches the end before reading two bytes.FilterInputStream.inCopyright © 2000–2016 DFKI GmbH. All rights reserved.