|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectcom.croftsoft.core.io.StreamLib
public final class StreamLib
A library of static methods for the manipulation of input and output streams.
Method Summary | |
---|---|
static void |
main(String[] args)
|
static boolean |
replaceBytes(InputStream in,
OutputStream out,
byte[] oldBytes,
byte[] newBytes)
Replaces bytes in a stream as it is being copied from the InputStream to the OutputStream. |
static String |
toString(InputStream inputStream)
Converts the bytes of the InputStream to a String. |
static String |
toString(InputStream inputStream,
String encoding)
Converts the bytes of the InputStream to a String. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Method Detail |
---|
public static void main(String[] args)
public static boolean replaceBytes(InputStream in, OutputStream out, byte[] oldBytes, byte[] newBytes) throws IOException
Does not automatically close the streams after completion. Maintains an internal buffer with the same size as oldBytes.
IOException
public static String toString(InputStream inputStream, String encoding) throws IOException, UnsupportedEncodingException
Does not automatically close the stream after completion.
IOException
UnsupportedEncodingException
public static String toString(InputStream inputStream) throws IOException
Does not automatically close the stream after completion.
IOException
|
CroftSoft Javadoc | |||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |