|
intarsys runtime library | |||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectde.intarsys.tools.stream.StreamTools
public class StreamTools
A tool class for the handling of streams.
| Field Summary | |
|---|---|
static int |
MAX_BUFFER
|
| Method Summary | |
|---|---|
static void |
close(InputStream is)
|
static void |
close(IRandomAccess ra)
|
static void |
close(OutputStream os)
|
static void |
close(RandomAccessFile ra)
|
static void |
close(Reader reader)
|
static void |
close(Writer writer)
|
static void |
copyEncoded(Reader reader,
boolean closeInput,
Writer writer,
boolean closeOutput)
|
static void |
copyEncoded(Reader reader,
Writer writer)
|
static void |
copyEncodedStream(InputStream source,
String sourceEncoding,
OutputStream destination,
String destinationEncoding)
|
static void |
copyStream(InputStream source,
boolean closeInput,
OutputStream destination,
boolean closeOutput)
Kopiert einen Eingabedatenstrom auf einen Ausgabedatenstrom. |
static void |
copyStream(InputStream source,
OutputStream destination)
Kopiert einen Stream. |
static byte[] |
getBytes(InputStream is)
The complete content of the InputStream as a byte array. |
static void |
putBytes(OutputStream os,
byte[] bytes)
Write all bytes to OutputStream. |
static byte[] |
toByteArray(InputStream is)
The complete content of the InputStream as a byte array. |
static String |
toString(InputStream is,
String encoding)
The complete content of the InputStream as a String,
converted using the specified encoding. |
static String |
toString(Reader r)
The complete content of the Reader as a String. |
| Methods inherited from class java.lang.Object |
|---|
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
public static final int MAX_BUFFER
| Method Detail |
|---|
public static void close(InputStream is)
public static void close(IRandomAccess ra)
public static void close(OutputStream os)
public static void close(RandomAccessFile ra)
public static void close(Reader reader)
public static void close(Writer writer)
public static void copyEncoded(Reader reader,
boolean closeInput,
Writer writer,
boolean closeOutput)
throws IOException
IOException
public static void copyEncoded(Reader reader,
Writer writer)
throws IOException
IOException
public static void copyEncodedStream(InputStream source,
String sourceEncoding,
OutputStream destination,
String destinationEncoding)
throws IOException
IOException
public static void copyStream(InputStream source,
boolean closeInput,
OutputStream destination,
boolean closeOutput)
throws 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.
IOException - Fehler allgemein oder beim Kopieren.
public static void copyStream(InputStream source,
OutputStream destination)
throws IOException
source - Eingabedatenstrom, der kopiert werden soll.destination - Ausgabestrom, auf den kopiert werden soll.
IOExceptioncopyStream(InputStream, boolean, OutputStream, boolean)
public static byte[] getBytes(InputStream is)
throws IOException
InputStream as a byte array. The
input stream is closed.
is -
InputStream as a byte array.
IOException
public static void putBytes(OutputStream os,
byte[] bytes)
throws IOException
OutputStream. The stream is closed.
os - bytes -
IOException
public static byte[] toByteArray(InputStream is)
throws IOException
InputStream as a byte array. The
input stream is closed.
is -
InputStream as a byte array.
IOException
public static String toString(InputStream is,
String encoding)
throws IOException
InputStream as a String,
converted using the specified encoding. If no encoding is specified, the
default encoding is used. The input stream is closed.
is - encoding -
InputStream as a
String
IOException
public static String toString(Reader r)
throws IOException
Reader as a String. The
reader is closed.
r -
Reader as a String.
IOException
|
intarsys runtime library | |||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||