URL.openConnection()
instead.
Please visit this webpage
for further details.@Deprecated public class QCodec extends java.lang.Object implements StringEncoder, StringDecoder
Similar to the Quoted-Printable content-transfer-encoding defined in RFC 1521 and designed to allow text containing mostly ASCII characters to be decipherable on an ASCII terminal without decoding.
RFC 1522 describes techniques to allow the encoding of non-ASCII text in various portions of a RFC 822 [2] message header, in a manner which is unlikely to confuse existing message handling software.
Constructor and Description |
---|
QCodec()
Deprecated.
Default constructor.
|
QCodec(java.lang.String charset)
Deprecated.
Constructor which allows for the selection of a default charset
|
Modifier and Type | Method and Description |
---|---|
java.lang.Object |
decode(java.lang.Object pObject)
Deprecated.
Decodes a quoted-printable object into its original form.
|
java.lang.String |
decode(java.lang.String pString)
Deprecated.
Decodes a quoted-printable string into its original form.
|
java.lang.Object |
encode(java.lang.Object pObject)
Deprecated.
Encodes an object into its quoted-printable form using the default charset.
|
java.lang.String |
encode(java.lang.String pString)
Deprecated.
Encodes a string into its quoted-printable form using the default charset.
|
java.lang.String |
encode(java.lang.String pString,
java.lang.String charset)
Deprecated.
Encodes a string into its quoted-printable form using the specified charset.
|
java.lang.String |
getDefaultCharset()
Deprecated.
The default charset used for string decoding and encoding.
|
boolean |
isEncodeBlanks()
Deprecated.
Tests if optional tranformation of SPACE characters is to be used
|
void |
setEncodeBlanks(boolean b)
Deprecated.
Defines whether optional tranformation of SPACE characters is to be used
|
public QCodec()
public QCodec(java.lang.String charset)
charset
- the default string charset to use.public java.lang.String encode(java.lang.String pString, java.lang.String charset) throws EncoderException
pString
- string to convert to quoted-printable formcharset
- the charset for pStringEncoderException
- thrown if a failure condition is encountered during the encoding process.public java.lang.String encode(java.lang.String pString) throws EncoderException
encode
in interface StringEncoder
pString
- string to convert to quoted-printable formEncoderException
- thrown if a failure condition is encountered during the encoding process.public java.lang.String decode(java.lang.String pString) throws DecoderException
decode
in interface StringDecoder
pString
- quoted-printable string to convert into its original formDecoderException
- A decoder exception is thrown if a failure condition is encountered during the decode process.public java.lang.Object encode(java.lang.Object pObject) throws EncoderException
encode
in interface Encoder
pObject
- object to convert to quoted-printable formEncoderException
- thrown if a failure condition is encountered during the encoding process.public java.lang.Object decode(java.lang.Object pObject) throws DecoderException
decode
in interface Decoder
pObject
- quoted-printable object to convert into its original formDecoderException
- A decoder exception is thrown if a failure condition is encountered during the decode process.public java.lang.String getDefaultCharset()
public boolean isEncodeBlanks()
true
if SPACE characters are to be transformed, false
otherwisepublic void setEncodeBlanks(boolean b)
b
- true
if SPACE characters are to be transformed, false
otherwise