|
|||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||
java.lang.Object | +--org.metastatic.rsync.Util
A number of useful, static methods.
| Field Summary | |
|---|---|
static String |
BASE_64
The characters for Base64 encoding. |
| Method Summary | |
|---|---|
static String |
base64(byte[] buf)
Base-64 encode a byte array, returning the returning string. |
static String |
readLine(InputStream in)
Read up to a '\n' or '\r', and return the resulting string. |
static String |
toHexString(byte[] b)
Convert a byte array to a big-endian ordered hexadecimal string. |
static String |
toHexString(byte[] b,
int off,
int len)
Convert a byte array to a big-endian ordered hexadecimal string. |
static void |
writeASCII(OutputStream out,
String ascii)
Write a String as a sequece of ASCII bytes. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
public static final String BASE_64
| Method Detail |
public static final String base64(byte[] buf)
Note that this method exists merely to be compatible with the challenge-response authentication method of rsyncd. It is not technincally a Base-64 encoder.
buf - The byte array to encode.
public static void writeASCII(OutputStream out,
String ascii)
throws IOException
out - The OutputStream to write to.ascii - The ASCII string to write.
IOException - If writing fails.
public static String readLine(InputStream in)
throws IOException
in - The InputStream to read from.
IOExceptionpublic static String toHexString(byte[] b)
b - The bytes to convert.
public static String toHexString(byte[] b,
int off,
int len)
b - The bytes to convert.
|
|||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||