Class cryptix.mime.CRLF
All Packages Class Hierarchy This Package Previous Next Index
Class cryptix.mime.CRLF
java.lang.Object
|
+----cryptix.mime.CRLF
- public class CRLF
- extends Object
This class provides static functions to convert strings to and from
the "canonical" form in which all line breaks are represented as
ASCII CR followed by ASCII LF.
- Author:
- Jill Baker
-
CRLF()
-
-
decode(byte[])
- Convert all canonical line breaks with a byte array (represented by
"\r\n" to machine-specific linebreaks.
-
decode(String)
- Convert all canonical line breaks with a string (represented by
"\r\n" to machine-specific linebreaks.
-
encode(byte[])
- Convert all line breaks within a byte array (represented by either '\r',
'\n' or '\r\n') to canonical ('\r\n') linebreaks.
-
encode(String)
- Convert all line breaks within a string (represented by either '\r',
'\n' or '\r\n') to canonical ('\r\n') linebreaks.
-
isProbablyEncoded(byte[])
- Test whether or not all line breaks within a byte array are of the
form "\r\n".
-
isProbablyEncoded(String)
- Test whether or not all line breaks within a String are of the
form "\r\n".
CRLF
public CRLF()
encode
public static String encode(String s)
- Convert all line breaks within a string (represented by either '\r',
'\n' or '\r\n') to canonical ('\r\n') linebreaks.
- Parameters:
- s - text to be encoded
- Returns:
- text with canonical line breaks
encode
public static byte[] encode(byte b[])
- Convert all line breaks within a byte array (represented by either '\r',
'\n' or '\r\n') to canonical ('\r\n') linebreaks.
- Parameters:
- b - text to be encoded
- Returns:
- text with canonical line breaks
decode
public static String decode(String s)
- Convert all canonical line breaks with a string (represented by
"\r\n" to machine-specific linebreaks.
- Parameters:
- s - text (with canonical line breaks) to be decoded
- Returns:
- text with machine-specific line breaks
decode
public static byte[] decode(byte b[])
- Convert all canonical line breaks with a byte array (represented by
"\r\n" to machine-specific linebreaks.
- Parameters:
- b - text (with canonical line breaks) to be decoded
- Returns:
- text with machine-specific line breaks
isProbablyEncoded
public static boolean isProbablyEncoded(String s)
- Test whether or not all line breaks within a String are of the
form "\r\n".
- Parameters:
- s - String to be tested.
- Returns:
- true if all line breaks are of the form "\r\n".
isProbablyEncoded
public static boolean isProbablyEncoded(byte b[])
- Test whether or not all line breaks within a byte array are of the
form "\r\n".
- Parameters:
- b - byte array to be tested.
- Returns:
- true if all line breaks are of the form "\r\n".
All Packages Class Hierarchy This Package Previous Next Index