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
IOException
public static void readToEol(InputStream input) throws IOException
IOException
public static byte[] readBytesWithLength(InputStream in) throws IOException
IOException
public static boolean readBoolean(InputStream input) throws IOException
IOException
public static int readUnsignedShort(InputStream input) throws IOException
IOException
public static int readInt(InputStream in) throws IOException
IOException
public static void readFully(InputStream in, byte[] b) throws IOException
IOException
public static void readFully(InputStream in, byte[] b, int off, int len) throws IOException
IOException
public static long readLong(InputStream in) throws IOException
IOException
public static void writeString(OutputStream output, Object o) throws IOException
IOException
public static void writeString(OutputStream output, String s) throws IOException
IOException
public static void writeChar(OutputStream output, char c) throws IOException
IOException
public static void writeShort(OutputStream out, int value) throws IOException
IOException
public static void writeInt(OutputStream out, int v) throws IOException
IOException
public static void writeLong(OutputStream out, long v) throws IOException
IOException
public static void writeBoolean(OutputStream os, boolean b) throws IOException
IOException
public static byte readByte(InputStream stream) throws IOException
IOException
public static int readUnsignedByte(InputStream stream) throws IOException
IOException
public static void copyStream(InputStream in, OutputStream out) throws IOException
IOException
public static String readUTFZBytes(InputStream input) throws IOException
IOException
public static void writeUTFZBytes(OutputStream outputStream, String string) throws IOException
IOException
public 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 © 2023 JBoss by Red Hat. All rights reserved.