@Deprecated public final class StreamUtil extends Object
NOTE: Methods taking a stream argument will not close the stream, this is left to the user.
Modifier and Type | Method and Description |
---|---|
static InputStream |
getInputStream(File f)
Deprecated.
|
static InputStream |
getInputStream(URL url)
Deprecated.
|
static OutputStream |
getOutputStream(File f)
Deprecated.
|
static ByteArrayInputStream |
makeByteInputStream(byte[] arr)
Deprecated.
|
static ByteArrayInputStream |
makeByteInputStream(byte[] arr,
int from,
int len)
Deprecated.
|
static ByteArrayOutputStream |
makeByteOutputStream()
Deprecated.
|
static ByteArrayOutputStream |
makeByteOutputStream(int size)
Deprecated.
|
static CharArrayReader |
makeCharReader(char[] arr)
Deprecated.
|
static CharArrayReader |
makeCharReader(char[] arr,
int from,
int len)
Deprecated.
|
static CharArrayReader |
makeCharReader(String s)
Deprecated.
|
static CharArrayReader |
makeCharReader(String s,
int from,
int len)
Deprecated.
|
static CharArrayWriter |
makeCharWriter()
Deprecated.
|
static CharArrayWriter |
makeCharWriter(int size)
Deprecated.
|
static byte[] |
readBinary(File f)
Deprecated.
returns the complete binary file as byte[]
|
static byte[] |
readBinary(InputStream is)
Deprecated.
|
static int |
readBinary(InputStream is,
byte[] buffer)
Deprecated.
reads up to buffer.length bytes from the stream, putting them in buffer.
|
static int |
readBinary(InputStream is,
byte[] buffer,
int from,
int len)
Deprecated.
|
static byte[] |
readBinary(URL url)
Deprecated.
returns the complete binary file as byte[]
|
static int |
readChar(InputStream is,
char[] buffer)
Deprecated.
attempts to fill the char buffer param, returns an int specifying how many chars were actually read
|
static int |
readChar(InputStream is,
char[] buffer,
int from,
int length)
Deprecated.
|
static Object |
readObject(InputStream is)
Deprecated.
reads and returns an object from the input stream.
|
static String |
readString(File f)
Deprecated.
returns the entire file as a String
|
static String |
readString(InputStream is)
Deprecated.
reads the rest of the input stream, returning the
resulting string.
|
static String |
readString(URL url)
Deprecated.
returns the complete url-connection-input-stream as a string
|
static void |
writeBinary(byte[] value,
File target)
Deprecated.
writes a binary value to the specified file, overwriting existing content
|
static void |
writeBinary(byte[] value,
OutputStream os)
Deprecated.
writes the 'value' array to the output stream
|
static void |
writeBinary(InputStream is,
OutputStream os)
Deprecated.
reads the input stream content writing it to the output stream.
|
static void |
writeObject(Object o,
File target)
Deprecated.
serializes an object to the specified file, overwriting existing content
|
static void |
writeObject(Object o,
OutputStream os)
Deprecated.
writes the specified object to the specified stream
|
static void |
writeString(InputStream is,
OutputStream os)
Deprecated.
reads the input stream writing it to the output stream.
|
static void |
writeString(String value,
File target)
Deprecated.
writes a string value to the specified file, overwriting existing content
|
static void |
writeString(String value,
OutputStream os)
Deprecated.
writes the specified string to the output stream.
|
public static byte[] readBinary(InputStream is)
public static byte[] readBinary(File f)
public static byte[] readBinary(URL url)
public static int readBinary(InputStream is, byte[] buffer)
public static int readBinary(InputStream is, byte[] buffer, int from, int len)
public static String readString(InputStream is)
is
- public static String readString(URL url)
public static int readChar(InputStream is, char[] buffer)
public static int readChar(InputStream is, char[] buffer, int from, int length)
public static Object readObject(InputStream is)
public static void writeBinary(byte[] value, OutputStream os)
public static void writeBinary(InputStream is, OutputStream os)
public static void writeString(String value, OutputStream os)
public static void writeString(InputStream is, OutputStream os)
public static void writeString(String value, File target)
public static void writeBinary(byte[] value, File target)
public static void writeObject(Object o, File target)
public static void writeObject(Object o, OutputStream os)
public static CharArrayReader makeCharReader(String s, int from, int len)
public static CharArrayReader makeCharReader(String s)
public static CharArrayReader makeCharReader(char[] arr)
public static CharArrayReader makeCharReader(char[] arr, int from, int len)
public static CharArrayWriter makeCharWriter()
public static CharArrayWriter makeCharWriter(int size)
public static ByteArrayInputStream makeByteInputStream(byte[] arr)
public static ByteArrayInputStream makeByteInputStream(byte[] arr, int from, int len)
public static ByteArrayOutputStream makeByteOutputStream()
public static ByteArrayOutputStream makeByteOutputStream(int size)
public static InputStream getInputStream(File f)
public static OutputStream getOutputStream(File f)
public static InputStream getInputStream(URL url)
© 1998- 2018 Stibo DX