public class StreamUtils
extends java.lang.Object
| Modifier and Type | Method and Description |
|---|---|
static byte[] |
read(java.io.DataInput from,
int numberOfBytes) |
static boolean |
readBoolean(java.io.DataInput from) |
static boolean |
readBoolean(java.io.InputStream from) |
static byte |
readByte(java.io.DataInput from) |
static byte |
readByte(java.io.InputStream from) |
static double |
readDouble(java.io.DataInput from) |
static double |
readDouble(java.io.InputStream from) |
static void |
readFixedByteCount(java.io.InputStream from,
byte[] to,
int offsetInTo,
int length) |
static float |
readFloat(java.io.DataInput from) |
static float |
readFloat(java.io.InputStream from) |
static int |
readInteger(java.io.DataInput from) |
static int |
readInteger(java.io.InputStream from) |
static long |
readLong(java.io.DataInput from) |
static long |
readLong(java.io.InputStream from) |
static <T> T |
readObject(java.lang.Class<T> type,
java.io.DataInput from) |
static <T> T |
readObject(java.lang.Class<T> type,
java.io.InputStream from) |
static short |
readShort(java.io.DataInput from) |
static short |
readShort(java.io.InputStream from) |
static java.lang.String |
readString(java.io.DataInput from,
int bufferSize,
java.nio.charset.Charset charset) |
static void |
readZeros(java.io.DataInput from,
int numberOfZeros) |
static void |
readZeros(java.io.InputStream from,
int numberOfZeros) |
static java.io.DataInput |
toDataInput(java.io.InputStream inputStream) |
static java.io.DataOutput |
toDataOutput(java.io.OutputStream outputStream) |
static void |
writeBoolean(boolean value,
java.io.DataOutput to) |
static void |
writeBoolean(boolean value,
java.io.OutputStream to) |
static void |
writeByte(byte value,
java.io.DataOutput to) |
static void |
writeByte(byte value,
java.io.OutputStream to) |
static void |
writeDouble(double value,
java.io.DataOutput to) |
static void |
writeDouble(double value,
java.io.OutputStream to) |
static void |
writeFloat(float value,
java.io.DataOutput to) |
static void |
writeFloat(float value,
java.io.OutputStream to) |
static void |
writeInteger(int value,
java.io.DataOutput to) |
static void |
writeInteger(int value,
java.io.OutputStream to) |
static void |
writeLong(long value,
java.io.DataOutput to) |
static void |
writeLong(long value,
java.io.OutputStream to) |
static <T> int |
writeObject(java.lang.Class<T> type,
T value,
java.io.DataOutput to) |
static <T> int |
writeObject(java.lang.Class<T> type,
T value,
java.io.OutputStream to) |
static void |
writeShort(short value,
java.io.DataOutput to) |
static void |
writeShort(short value,
java.io.OutputStream to) |
static int |
writeString(int bufferSize,
java.lang.String value,
java.nio.charset.Charset charset,
java.io.DataOutput to) |
static int |
writeString(int bufferSize,
java.lang.String value,
java.nio.charset.Charset charset,
java.io.OutputStream to) |
static int |
writeZeros(int numberOfZeros,
java.io.DataOutput to) |
static int |
writeZeros(int numberOfZeros,
java.io.OutputStream to) |
@Nonnegative
public static <T> int writeObject(@Nonnull
java.lang.Class<T> type,
@Nullable
T value,
@Nonnull
java.io.DataOutput to)
throws java.io.IOException
java.io.IOException@Nonnegative
public static <T> int writeObject(@Nonnull
java.lang.Class<T> type,
@Nullable
T value,
@Nonnull
java.io.OutputStream to)
throws java.io.IOException
java.io.IOExceptionpublic static void writeBoolean(boolean value,
@Nonnull
java.io.DataOutput to)
throws java.io.IOException
java.io.IOExceptionpublic static void writeBoolean(boolean value,
@Nonnull
java.io.OutputStream to)
throws java.io.IOException
java.io.IOExceptionpublic static void writeByte(byte value,
@Nonnull
java.io.DataOutput to)
throws java.io.IOException
java.io.IOExceptionpublic static void writeByte(byte value,
@Nonnull
java.io.OutputStream to)
throws java.io.IOException
java.io.IOExceptionpublic static void writeShort(short value,
@Nonnull
java.io.DataOutput to)
throws java.io.IOException
java.io.IOExceptionpublic static void writeShort(short value,
@Nonnull
java.io.OutputStream to)
throws java.io.IOException
java.io.IOExceptionpublic static void writeInteger(int value,
@Nonnull
java.io.DataOutput to)
throws java.io.IOException
java.io.IOExceptionpublic static void writeInteger(int value,
@Nonnull
java.io.OutputStream to)
throws java.io.IOException
java.io.IOExceptionpublic static void writeLong(long value,
@Nonnull
java.io.DataOutput to)
throws java.io.IOException
java.io.IOExceptionpublic static void writeLong(long value,
@Nonnull
java.io.OutputStream to)
throws java.io.IOException
java.io.IOExceptionpublic static void writeFloat(float value,
@Nonnull
java.io.DataOutput to)
throws java.io.IOException
java.io.IOExceptionpublic static void writeFloat(float value,
@Nonnull
java.io.OutputStream to)
throws java.io.IOException
java.io.IOExceptionpublic static void writeDouble(double value,
@Nonnull
java.io.DataOutput to)
throws java.io.IOException
java.io.IOExceptionpublic static void writeDouble(double value,
@Nonnull
java.io.OutputStream to)
throws java.io.IOException
java.io.IOException@Nonnegative
public static int writeString(@Nonnegative
int bufferSize,
@Nullable
java.lang.String value,
@Nonnull
java.nio.charset.Charset charset,
@Nonnull
java.io.DataOutput to)
throws java.io.IOException
java.io.IOException@Nonnegative
public static int writeString(@Nonnegative
int bufferSize,
@Nullable
java.lang.String value,
@Nonnull
java.nio.charset.Charset charset,
@Nonnull
java.io.OutputStream to)
throws java.io.IOException
java.io.IOException@Nonnegative
public static int writeZeros(@Nonnegative
int numberOfZeros,
@Nonnull
java.io.DataOutput to)
throws java.io.IOException
java.io.IOException@Nonnegative
public static int writeZeros(@Nonnegative
int numberOfZeros,
@Nonnull
java.io.OutputStream to)
throws java.io.IOException
java.io.IOExceptionpublic static boolean readBoolean(@Nonnull
java.io.DataInput from)
throws java.io.IOException
java.io.IOExceptionpublic static boolean readBoolean(@Nonnull
java.io.InputStream from)
throws java.io.IOException
java.io.IOExceptionpublic static byte readByte(@Nonnull
java.io.DataInput from)
throws java.io.IOException
java.io.IOExceptionpublic static byte readByte(@Nonnull
java.io.InputStream from)
throws java.io.IOException
java.io.IOExceptionpublic static short readShort(@Nonnull
java.io.DataInput from)
throws java.io.IOException
java.io.IOExceptionpublic static short readShort(@Nonnull
java.io.InputStream from)
throws java.io.IOException
java.io.IOExceptionpublic static int readInteger(@Nonnull
java.io.DataInput from)
throws java.io.IOException
java.io.IOExceptionpublic static int readInteger(@Nonnull
java.io.InputStream from)
throws java.io.IOException
java.io.IOExceptionpublic static long readLong(@Nonnull
java.io.DataInput from)
throws java.io.IOException
java.io.IOExceptionpublic static long readLong(@Nonnull
java.io.InputStream from)
throws java.io.IOException
java.io.IOExceptionpublic static float readFloat(@Nonnull
java.io.DataInput from)
throws java.io.IOException
java.io.IOExceptionpublic static float readFloat(@Nonnull
java.io.InputStream from)
throws java.io.IOException
java.io.IOExceptionpublic static double readDouble(@Nonnull
java.io.DataInput from)
throws java.io.IOException
java.io.IOExceptionpublic static double readDouble(@Nonnull
java.io.InputStream from)
throws java.io.IOException
java.io.IOException@Nullable
public static java.lang.String readString(@Nonnull
java.io.DataInput from,
@Nonnegative
int bufferSize,
@Nonnull
java.nio.charset.Charset charset)
throws java.io.IOException
java.io.IOExceptionpublic static void readZeros(@Nonnull
java.io.DataInput from,
@Nonnegative
int numberOfZeros)
throws java.io.IOException
java.io.IOExceptionpublic static void readZeros(@Nonnull
java.io.InputStream from,
@Nonnegative
int numberOfZeros)
throws java.io.IOException
java.io.IOException@Nullable
public static <T> T readObject(@Nonnull
java.lang.Class<T> type,
@Nonnull
java.io.DataInput from)
throws java.io.IOException
java.io.IOException@Nullable
public static <T> T readObject(@Nonnull
java.lang.Class<T> type,
@Nonnull
java.io.InputStream from)
throws java.io.IOException
java.io.IOException@Nonnull
public static byte[] read(@Nonnull
java.io.DataInput from,
@Nonnegative
int numberOfBytes)
throws java.io.IOException
java.io.IOExceptionpublic static void readFixedByteCount(@Nonnull
java.io.InputStream from,
@Nonnull
byte[] to,
@Nonnegative
int offsetInTo,
@Nonnegative
int length)
throws java.io.IOException
java.io.IOException@Nonnull
public static java.io.DataOutput toDataOutput(@Nonnull
java.io.OutputStream outputStream)
@Nonnull
public static java.io.DataInput toDataInput(@Nonnull
java.io.InputStream inputStream)
Copyright © 2013 echocat. All Rights Reserved.