|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectcom.hunnysoft.jmime.Uuencode
Class for performing uuencode or uudecode operations.
%Uuencode performs uuencode or uudecode operations.
%Uuencode is a format for encoding binary data into text
characters for transmission through the mail system. The format also
includes the file name and the file mode. (Note: The file mode is
significant only on UNIX-like systems.) In MIME, the use of uuencode is
deprecated; base64 is the preferred encoding for sending binary data.
Uuencode is still widely used to post binary content to Usenet
newsgroups.
To use %Uuencode for encoding binary data into uuencode
format, call setFileName() and
setBinaryChars() to set the file name and binary data
string. Then call the encode() method. Finally, call
asciiChars() to retrieve the uuencoded text
characters.
To use %Uuencode to decode uuencoded data, call
setAsciiChars() to set the ASCII characters. Then call the
decode() method. Finally, call fileName() and
binaryChars() to get the file name and binary
characters.
| Constructor Summary | |
Uuencode()
Default constructor. |
|
| Method Summary | |
ByteString |
asciiChars()
Gets the encoded characters. |
ByteString |
bytes()
Gets the binary file content. |
int |
decode()
Performs the decode operation. |
void |
encode()
Performs the encode operation. |
short |
fileMode()
Gets the file mode. |
ByteString |
fileName()
Gets the file name. |
void |
setAsciiChars(ByteString chars)
Sets the encoded characters. |
void |
setBytes(ByteString bytes)
Sets the binary file content. |
void |
setFileMode(short mode)
Sets the file mode. |
void |
setFileName(ByteString name)
Sets the file name. |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
public Uuencode()
| Method Detail |
public void setFileName(ByteString name)
The implementation limits the file name to 255 characters.
name - the file namepublic ByteString fileName()
The implementation limits the file name to 255 characters.
public void setFileMode(short mode)
The file mode is a bit mask that indicates file permissions in the standard Unix file system. Most implementations of uuencode ignore the file mode because it is unsafe to allow an untrusted source to set file permissions on local files. Hunny JMIME allows you to set the file mode explicitly in the uuencoded file. Unless you have a specific need, you should either set the file mode to 0644 (octal) or let Hunny JMIME set the default value of 0644.
If the file mode is not explicitly set using this member function, a default value of 0644 (octal) is assumed.
mode - the file modepublic short fileMode()
The file mode is a bit mask that indicates file permissions in the standard Unix file system. You should ignore the file mode because it is unsafe to allow an untrusted source to set file permissions on local files.
public void setBytes(ByteString bytes)
bytes - the bytes of the file contentpublic ByteString bytes()
public void setAsciiChars(ByteString chars)
chars - the encoded characterspublic ByteString asciiChars()
public void encode()
public int decode()
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||