public class StreamTools
extends java.lang.Object
Modifier and Type | Field and Description |
---|---|
static int |
MAX_BUFFER |
Modifier and Type | Method and Description |
---|---|
static void |
close(java.io.InputStream is) |
static void |
close(IRandomAccess ra) |
static void |
close(java.io.OutputStream os) |
static void |
close(java.io.RandomAccessFile ra) |
static void |
close(java.io.Reader reader) |
static void |
close(java.io.Writer writer) |
static void |
copyEncoded(java.io.Reader reader,
java.io.Writer writer) |
static void |
copyEncodedStream(java.io.InputStream source,
java.lang.String sourceEncoding,
java.io.OutputStream destination,
java.lang.String destinationEncoding) |
static void |
copyStream(java.io.InputStream source,
boolean closeInput,
java.io.OutputStream destination,
boolean closeOutput)
Kopiert einen Eingabedatenstrom auf einen Ausgabedatenstrom.
|
static void |
copyStream(java.io.InputStream source,
java.io.OutputStream destination)
Kopiert einen Stream.
|
static void |
copyStream(java.io.InputStream source,
java.io.OutputStream destination,
long length)
Kopiert einen Eingabedatenstrom auf einen Ausgabedatenstrom.
|
static byte[] |
toByteArray(java.io.InputStream is) |
static java.lang.String |
toString(java.io.InputStream is,
java.lang.String encoding) |
static java.lang.String |
toString(java.io.Reader r) |
public static final int MAX_BUFFER
public static void close(java.io.InputStream is)
public static void close(IRandomAccess ra)
public static void close(java.io.OutputStream os)
public static void close(java.io.RandomAccessFile ra)
public static void close(java.io.Reader reader)
public static void close(java.io.Writer writer)
public static void copyEncoded(java.io.Reader reader, java.io.Writer writer) throws java.io.IOException
java.io.IOException
public static void copyEncodedStream(java.io.InputStream source, java.lang.String sourceEncoding, java.io.OutputStream destination, java.lang.String destinationEncoding) throws java.io.IOException
java.io.IOException
public static void copyStream(java.io.InputStream source, boolean closeInput, java.io.OutputStream destination, boolean closeOutput) throws java.io.IOException
source
- EingabedatenstromcloseInput
- Angabe ob der InputStream nach dem Kopieren geschlossen werden
soll.destination
- AusgabedatenstromcloseOutput
- Angabe ob der OutputStream nach dem Kopieren geschlossen
werden soll.java.io.IOException
- Fehler allgemein oder beim Kopieren.public static void copyStream(java.io.InputStream source, java.io.OutputStream destination) throws java.io.IOException
source
- Eingabedatenstrom, der kopiert werden soll.destination
- Ausgabestrom, auf den kopiert werden soll.java.io.IOException
copyStream(InputStream, boolean, OutputStream, boolean)
public static void copyStream(java.io.InputStream source, java.io.OutputStream destination, long length) throws java.io.IOException
source
- Eingabedatenstromdestination
- Ausgabedatenstromlength
- Anzahl der zu lesenden bytesjava.io.IOException
public static byte[] toByteArray(java.io.InputStream is) throws java.io.IOException
java.io.IOException
public static java.lang.String toString(java.io.InputStream is, java.lang.String encoding) throws java.io.IOException
java.io.IOException
public static java.lang.String toString(java.io.Reader r) throws java.io.IOException
java.io.IOException