|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectfedora.server.utilities.StreamUtility
public abstract class StreamUtility
Utility methods for working with character-based or raw sequences of data.
| Constructor Summary | |
|---|---|
StreamUtility()
|
|
| Method Summary | |
|---|---|
static byte[] |
decodeBase64(java.lang.String data)
|
static void |
enc(char[] in,
int start,
int length,
java.lang.StringBuffer out)
Appends an XML-appropriate encoding of the given range of characters to the given StringBuffer. |
static void |
enc(char in,
java.lang.StringBuffer out)
Appends an XML-appropriate encoding of the given character to the given StringBuffer. |
static java.lang.String |
enc(java.lang.String in)
Returns an XML-appropriate encoding of the given String. |
static void |
enc(java.lang.String in,
java.lang.StringBuffer out)
Appends an XML-appropriate encoding of the given String to the given StringBuffer. |
static java.lang.String |
encodeBase64(byte[] data)
|
static java.lang.String |
encodeBase64(java.io.InputStream is)
|
static void |
pipeStream(java.io.InputStream in,
java.io.OutputStream out,
int bufSize)
Copies the contents of an InputStream to an OutputStream, then closes both. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public StreamUtility()
| Method Detail |
|---|
public static java.lang.String enc(java.lang.String in)
in - The String to encode.
public static void enc(java.lang.String in,
java.lang.StringBuffer out)
in - The String to encode.out - The StringBuffer to write to.
public static void enc(char[] in,
int start,
int length,
java.lang.StringBuffer out)
in - The char buffer to read from.start - The starting index.length - The number of characters in the range.out - The StringBuffer to write to.
public static void enc(char in,
java.lang.StringBuffer out)
in - The character.out - The StringBuffer to write to.
public static void pipeStream(java.io.InputStream in,
java.io.OutputStream out,
int bufSize)
throws java.io.IOException
in - The source stream.out - The target stram.bufSize - Number of bytes to attempt to copy at a time.
java.io.IOException - If any sort of read/write error occurs on either
stream.public static byte[] decodeBase64(java.lang.String data)
public static java.lang.String encodeBase64(byte[] data)
public static java.lang.String encodeBase64(java.io.InputStream is)
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||