|
ElegantJCharts Java API Specification v2.0 | |||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Object | +--com.elegantj.net.message.MIME
This Class provides support for MIME
| Constructor Summary | |
MIME()
The default constructor which constructs a MIME object with MIME Version 1.0 |
|
MIME(java.lang.String ver)
The constructor which constructs a MIME object with specified MIME Version |
|
| Method Summary | |
byte[] |
decodeMessage(byte[] encodedMessage)
Method to decode the message specified in byte buffer |
java.lang.String |
decodeMessage(java.lang.String encodedMessage,
java.lang.String encodingType)
Method to decode the specified message |
byte[] |
decodeMessageData(java.lang.String encodedData,
java.lang.String encoding)
Method to decode the specified string |
static byte[] |
doBASE64Decoding(byte[] buf)
Method to perform BASE64 decoding |
static void |
doBASE64Decoding(java.io.FileInputStream fin,
java.io.FileOutputStream fout)
Method to perform BASE64 decoding |
static java.lang.String |
doBASE64Decoding(java.lang.String buf)
Method to perform BASE64 decoding |
static byte[] |
doBASE64Encoding(byte[] buf)
Method to perform BASE64 encoding |
static java.lang.String |
doBASE64Encoding(java.lang.String buf)
Method to perform BASE64 encoding |
java.lang.String |
getContentDisposition(java.lang.String ctype)
Method to get Content-Disposition from the content-type |
java.lang.String |
getContentTransferEncoding(java.lang.String ctype)
Method to get Content-Transfer-Encoding scheme from the content-type |
java.lang.String |
getContentType(java.lang.String fileName)
Method to get the MIME type of the file from its extension |
java.lang.String |
getPrimaryType(java.lang.String ctype)
Method to get primary-type from the content-type |
void |
printTable()
A utility method to print content of hashtable of file-extensions and its content type. |
byte[] |
setByteArrayAsPart(byte[] byteBuffer,
java.lang.String ctype)
Method to set the specified byte buffer as part of the message |
byte[] |
setFileAsPart(java.lang.String fname)
Method to set the specified file as part of the message |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
public MIME()
public MIME(java.lang.String ver)
ver - The MIME version| Method Detail |
public void printTable()
public java.lang.String getContentType(java.lang.String fileName)
fileName - The name of the file
public java.lang.String getPrimaryType(java.lang.String ctype)
ctype - The content-type
public java.lang.String getContentTransferEncoding(java.lang.String ctype)
ctype - The content-type
public java.lang.String getContentDisposition(java.lang.String ctype)
ctype - The content-type
public static java.lang.String doBASE64Encoding(java.lang.String buf)
buf - The string to be encoded
public static byte[] doBASE64Encoding(byte[] buf)
buf - The array of bytes to be encoded
public static java.lang.String doBASE64Decoding(java.lang.String buf)
buf - The string to be decoded, which is encoded using BASE64 scheme
public static void doBASE64Decoding(java.io.FileInputStream fin,
java.io.FileOutputStream fout)
fin - The file which we want to decode, and which contents is encoded using BASE64 schemefout - The file in which we want to write decoded datapublic static byte[] doBASE64Decoding(byte[] buf)
buf - The array of byte which content we want to decode, and which content is encoded using BASE64 scheme
public byte[] setFileAsPart(java.lang.String fname)
throws java.io.FileNotFoundException,
java.io.IOException
fname - The name of the file which we want to set as a part of the message
java.io.FileNotFoundException
java.io.IOException
public byte[] setByteArrayAsPart(byte[] byteBuffer,
java.lang.String ctype)
byteBuffer - The array of bytes which we want to set as a part of the messagectype - The content-type
public java.lang.String decodeMessage(java.lang.String encodedMessage,
java.lang.String encodingType)
encodedMessage - The encoded messageencodingType - The encoding scheme using which the 'encodedMessage' is encoded
public byte[] decodeMessage(byte[] encodedMessage)
encodedMessage - The array of bytes which contains the encoded message
public byte[] decodeMessageData(java.lang.String encodedData,
java.lang.String encoding)
encodedData - The string containing the encoded dataencoding - The encoding scheme using which the 'encodedData' is encoded
|
ElegantJCharts Java API Specification v2.0 | |||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||