Home | History | Annotate | Download | only in codec

Lines Matching refs:Encoding

34  * Static methods for encoding header field values. This includes encoded-words
83 public enum Encoding {
84 /** The B encoding (identical to base64 defined in RFC 2045). */
86 /** The Q encoding (similar to quoted-printable defined in RFC 2045). */
191 * @return the specified text if encoding is not necessary or an encoded
232 // than 78 characters each. Encoding as encoded-words makes
254 * encoding to use for the encoded-word are detected automatically.
278 * encoding to use for the encoded-word are detected automatically.
312 * @param encoding
313 * the encoding to use for the encoded-word (either B or Q). A
314 * suitable encoding is automatically chosen if this parameter is
321 int usedCharacters, Charset charset, Encoding encoding) {
338 if (encoding == null)
339 encoding = determineEncoding(bytes, usage);
341 if (encoding == Encoding.B) {
351 * Encodes the specified byte array using the B encoding defined in RFC
391 * Encodes the specified byte array using the Q encoding defined in RFC
608 private static Encoding determineEncoding(byte[] bytes, Usage usage) {
610 return Encoding.Q;
624 return percentage > 30 ? Encoding.B : Encoding.Q;