public final class StreamUtils extends Object
| Modifier and Type | Method and Description |
|---|---|
static void |
copyStream(InputStream in,
OutputStream out) |
static boolean |
readBoolean(InputStream input) |
static byte |
readByte(InputStream stream) |
static byte[] |
readBytesWithLength(InputStream in) |
static int |
readChar(InputStream input) |
static void |
readFully(InputStream in,
byte[] b) |
static void |
readFully(InputStream in,
byte[] b,
int off,
int len) |
static int |
readInt(InputStream in) |
static long |
readLong(InputStream in) |
static void |
readToEol(InputStream input) |
static int |
readUnsignedByte(InputStream stream) |
static int |
readUnsignedShort(InputStream input) |
static String |
readUTFZBytes(InputStream input) |
static void |
safeClose(Closeable closeable) |
static void |
safeClose(ServerSocket serverSocket) |
static void |
safeClose(Socket socket) |
static void |
safeClose(XMLStreamWriter writer) |
static void |
safeFinish(org.jboss.marshalling.Marshaller marshaller) |
static void |
safeFinish(org.jboss.marshalling.Unmarshaller unmarshaller) |
static void |
writeBoolean(OutputStream os,
boolean b) |
static void |
writeChar(OutputStream output,
char c) |
static void |
writeInt(OutputStream out,
int v) |
static void |
writeLong(OutputStream out,
long v) |
static void |
writeShort(OutputStream out,
int value) |
static void |
writeString(OutputStream output,
Object o) |
static void |
writeString(OutputStream output,
String s) |
static void |
writeUTFZBytes(OutputStream outputStream,
String string) |
public static int readChar(InputStream input) throws IOException
IOExceptionpublic static void readToEol(InputStream input) throws IOException
IOExceptionpublic static byte[] readBytesWithLength(InputStream in) throws IOException
IOExceptionpublic static boolean readBoolean(InputStream input) throws IOException
IOExceptionpublic static int readUnsignedShort(InputStream input) throws IOException
IOExceptionpublic static int readInt(InputStream in) throws IOException
IOExceptionpublic static void readFully(InputStream in, byte[] b) throws IOException
IOExceptionpublic static void readFully(InputStream in, byte[] b, int off, int len) throws IOException
IOExceptionpublic static long readLong(InputStream in) throws IOException
IOExceptionpublic static void writeString(OutputStream output, Object o) throws IOException
IOExceptionpublic static void writeString(OutputStream output, String s) throws IOException
IOExceptionpublic static void writeChar(OutputStream output, char c) throws IOException
IOExceptionpublic static void writeShort(OutputStream out, int value) throws IOException
IOExceptionpublic static void writeInt(OutputStream out, int v) throws IOException
IOExceptionpublic static void writeLong(OutputStream out, long v) throws IOException
IOExceptionpublic static void writeBoolean(OutputStream os, boolean b) throws IOException
IOExceptionpublic static byte readByte(InputStream stream) throws IOException
IOExceptionpublic static int readUnsignedByte(InputStream stream) throws IOException
IOExceptionpublic static void copyStream(InputStream in, OutputStream out) throws IOException
IOExceptionpublic static String readUTFZBytes(InputStream input) throws IOException
IOExceptionpublic static void writeUTFZBytes(OutputStream outputStream, String string) throws IOException
IOExceptionpublic static void safeClose(Closeable closeable)
public static void safeClose(Socket socket)
public static void safeClose(ServerSocket serverSocket)
public static void safeFinish(org.jboss.marshalling.Marshaller marshaller)
public static void safeFinish(org.jboss.marshalling.Unmarshaller unmarshaller)
public static void safeClose(XMLStreamWriter writer)
Copyright © 2018 JBoss by Red Hat. All rights reserved.