Home
last modified time | relevance | path

Searched refs:charset (Results 1 – 25 of 88) sorted by relevance

1234

/packages/apps/UnifiedEmail/src/org/apache/james/mime4j/codec/
DEncoderUtil.java23 import java.nio.charset.Charset;
321 int usedCharacters, Charset charset, Encoding encoding) { in encodeEncodedWord() argument
327 if (charset == null) in encodeEncodedWord()
328 charset = determineCharset(text); in encodeEncodedWord()
330 String mimeCharset = CharsetUtil.toMimeCharset(charset.name()); in encodeEncodedWord()
336 byte[] bytes = encode(text, charset); in encodeEncodedWord()
343 return encodeB(prefix, text, usedCharacters, charset, bytes); in encodeEncodedWord()
346 return encodeQ(prefix, text, usage, usedCharacters, charset, bytes); in encodeEncodedWord()
513 int usedCharacters, Charset charset, byte[] bytes) { in encodeB() argument
524 byte[] bytes1 = encode(part1, charset); in encodeB()
[all …]
/packages/apps/Bluetooth/src/com/android/bluetooth/map/
DBluetoothMapUtils.java25 import java.nio.charset.Charset;
26 import java.nio.charset.IllegalCharsetNameException;
466 String charset; in stripEncoding() local
472 charset = m.group(1); in stripEncoding()
476 "Matching:" + match + "\nCharset: " + charset + "\nEncoding : " + encoding in stripEncoding()
481 str = new String(quotedPrintableToUtf8(encodedText, charset)); in stripEncoding()
489 Base64.decode(encodedText.getBytes(charset), Base64.DEFAULT), in stripEncoding()
490 charset); in stripEncoding()
494 Log.e(TAG, "stripEncoding: Unsupported charset: " + charset); in stripEncoding()
514 public static byte[] quotedPrintableToUtf8(String text, String charset) { in quotedPrintableToUtf8() argument
[all …]
DBluetoothMapbMessageMime.java23 import java.nio.charset.Charset;
24 import java.nio.charset.IllegalCharsetNameException;
51 String charset = mCharsetName; in getDataAsString() local
54 if (charset == null) { in getDataAsString()
55 charset = "UTF-8"; in getDataAsString()
57 charset = charset.toUpperCase(); in getDataAsString()
59 if (!Charset.isSupported(charset)) { in getDataAsString()
60 charset = "UTF-8"; in getDataAsString()
63 Log.w(TAG, "Received unknown charset: " + charset + " - using UTF-8."); in getDataAsString()
64 charset = "UTF-8"; in getDataAsString()
[all …]
/packages/apps/Email/src/com/beetstra/jutf7/
DCharsetProvider.java27 import java.nio.charset.Charset;
40 public class CharsetProvider extends java.nio.charset.spi.CharsetProvider {
72 Charset charset = iter.next(); in charsetForName() local
73 if (charset.name().equals(charsetName)) in charsetForName()
74 return charset; in charsetForName()
77 Charset charset = iter.next(); in charsetForName() local
78 if (charset.aliases().contains(charsetName)) in charsetForName()
79 return charset; in charsetForName()
DUTF7StyleCharset.java27 import java.nio.charset.Charset;
28 import java.nio.charset.CharsetDecoder;
29 import java.nio.charset.CharsetEncoder;
/packages/apps/UnifiedEmail/src/org/apache/james/mime4j/decoder/
DDecoderUtil.java110 public static String decodeB(String encodedWord, String charset) in decodeB() argument
113 return new String(decodeBase64(encodedWord), charset); in decodeB()
126 public static String decodeQ(String encodedWord, String charset) in decodeQ() argument
142 return new String(decodeBaseQuotedPrintable(sb.toString()), charset); in decodeQ()
231 String charset = CharsetUtil.toJavaCharset(mimeCharset); in decodeEncodedWord() local
232 if (charset == null) { in decodeEncodedWord()
239 } else if (!CharsetUtil.isDecodingSupported(charset)) { in decodeEncodedWord()
242 + charset + "' (MIME charset '" + mimeCharset in decodeEncodedWord()
259 return DecoderUtil.decodeQ(encodedText, charset); in decodeEncodedWord()
261 return DecoderUtil.decodeB(encodedText, charset); in decodeEncodedWord()
/packages/apps/UnifiedEmail/src/org/apache/james/mime4j/util/
DCharsetUtil.java23 import java.nio.charset.IllegalCharsetNameException;
24 import java.nio.charset.UnsupportedCharsetException;
1080 public static final java.nio.charset.Charset US_ASCII = java.nio.charset.Charset
1083 public static final java.nio.charset.Charset ISO_8859_1 = java.nio.charset.Charset
1086 public static final java.nio.charset.Charset UTF_8 = java.nio.charset.Charset
1192 public static java.nio.charset.Charset getCharset(String charsetName) { in getCharset()
1199 return java.nio.charset.Charset.forName(charsetName); in getCharset()
1204 return java.nio.charset.Charset.forName(defaultCharset); in getCharset()
1209 return java.nio.charset.Charset.forName(defaultCharset); in getCharset()
/packages/apps/Messaging/src/com/android/messaging/mmslib/pdu/
DEncodedStringValue.java52 public EncodedStringValue(int charset, byte[] data) { in EncodedStringValue() argument
58 mCharacterSet = charset; in EncodedStringValue()
84 public EncodedStringValue(int charset, String data) { in EncodedStringValue() argument
88 mCharacterSet = charset; in EncodedStringValue()
90 mData = data.getBytes(CharacterSets.getMimeName(charset)); in EncodedStringValue()
92 Log.e(TAG, "Input encoding " + charset + " must be supported.", e); in EncodedStringValue()
111 public void setCharacterSet(int charset) { in setCharacterSet() argument
113 mCharacterSet = charset; in setCharacterSet()
DPduPart.java206 public void setCharset(final int charset) { in setCharset() argument
207 mPartHeader.put(P_CHARSET, charset); in setCharset()
216 final Integer charset = (Integer) mPartHeader.get(P_CHARSET); in getCharset() local
217 if (charset == null) { in getCharset()
220 return charset.intValue(); in getCharset()
DPduPersister.java324 final int charset = c.getInt(charsetColumnIndex); in setEncodedStringValueToHeaders() local
326 charset, getBytes(s)); in setEncodedStringValueToHeaders()
392 final Integer charset = getIntegerFromPartColumn( in loadParts() local
394 if (charset != null) { in loadParts()
395 part.setCharset(charset); in loadParts()
457 charset != null ? charset : CharacterSets.DEFAULT_CHARSET, in loadParts()
774 final int charset = part.getCharset(); in persistPart() local
775 if (charset != 0) { in persistPart()
776 values.put(Part.CHARSET, charset); in persistPart()
801 final String encodedDataString = new EncodedStringValue(charset, data).getString(); in persistPart()
[all …]
DPduParser.java900 Integer charset = (Integer) map.get(PduPart.P_CHARSET); in parseParts() local
901 if (null != charset) { in parseParts()
902 part.setCharset(charset); in parseParts()
1064 int charset = 0; in parseEncodedStringValue() local
1076 charset = parseShortInteger(pduDataStream); //get the "Charset" in parseEncodedStringValue()
1082 if (0 != charset) { in parseEncodedStringValue()
1083 returnValue = new EncodedStringValue(charset, textString); in parseEncodedStringValue()
1504 int charset = (int) parseIntegerValue(pduDataStream); in parseContentTypeParams() local
1506 map.put(PduPart.P_CHARSET, charset); in parseContentTypeParams()
DPduComposer.java334 final int charset = enStr.getCharacterSet(); in appendEncodedString() local
348 appendShortInteger(charset); in appendEncodedString()
1015 final int charset = part.getCharset(); in makeMessageBody() local
1016 if (charset != 0) { in makeMessageBody()
1018 appendShortInteger(charset); in makeMessageBody()
/packages/apps/Dialer/java/com/android/voicemail/impl/mail/utils/
DUtility.java19 import java.nio.charset.Charset;
55 private static byte[] encode(Charset charset, String s) { in encode() argument
59 final ByteBuffer buffer = charset.encode(CharBuffer.wrap(s)); in encode()
65 private static String decode(Charset charset, byte[] b) { in decode() argument
69 final CharBuffer cb = charset.decode(ByteBuffer.wrap(b)); in decode()
/packages/apps/Dialer/java/com/android/voicemail/impl/mail/internet/
DMimeUtility.java234 String charset = getHeaderParameter(part.getContentType(), "charset"); in getTextFromPart() local
235 if (charset != null) { in getTextFromPart()
239 charset = CharsetUtil.lookup(charset).name(); in getTextFromPart()
244 if (charset == null) { in getTextFromPart()
245 charset = "ASCII"; in getTextFromPart()
250 String result = out.toString(charset); in getTextFromPart()
/packages/apps/UnifiedEmail/src/com/android/emailcommon/internet/
DMimeUtility.java243 String charset = getHeaderParameter(part.getContentType(), "charset"); in getTextFromPart() local
244 if (charset != null) { in getTextFromPart()
248 charset = CharsetUtil.toJavaCharset(charset); in getTextFromPart()
253 if (charset == null) { in getTextFromPart()
254 charset = "ASCII"; in getTextFromPart()
259 String result = out.toString(charset); in getTextFromPart()
/packages/apps/Messaging/src/android/support/v7/mms/pdu/
DPduPart.java231 public void setCharset(int charset) { in setCharset() argument
232 mPartHeader.put(P_CHARSET, charset); in setCharset()
241 Integer charset = (Integer) mPartHeader.get(P_CHARSET); in getCharset() local
242 if(charset == null) { in getCharset()
245 return charset.intValue(); in getCharset()
DEncodedStringValue.java52 public EncodedStringValue(int charset, byte[] data) { in EncodedStringValue() argument
58 mCharacterSet = charset; in EncodedStringValue()
96 public void setCharacterSet(int charset) { in setCharacterSet() argument
98 mCharacterSet = charset; in setCharacterSet()
DPduParser.java866 Integer charset = (Integer) map.get(PduPart.P_CHARSET); in parseParts() local
867 if (null != charset) { in parseParts()
868 part.setCharset(charset); in parseParts()
1029 int charset = 0; in parseEncodedStringValue() local
1041 charset = parseShortInteger(pduDataStream); //get the "Charset" in parseEncodedStringValue()
1047 if (0 != charset) { in parseEncodedStringValue()
1048 returnValue = new EncodedStringValue(charset, textString); in parseEncodedStringValue()
1467 int charset = (int) parseIntegerValue(pduDataStream); in parseContentTypeParams() local
1469 map.put(PduPart.P_CHARSET, charset); in parseContentTypeParams()
/packages/apps/Bluetooth/src/com/android/bluetooth/mapclient/obex/
DRequestGetMessage.java31 import java.nio.charset.StandardCharsets;
45 RequestGetMessage(String handle, MasClient.CharsetType charset, boolean attachment) { in RequestGetMessage() argument
54 MasClient.CharsetType.UTF_8.equals(charset) ? CHARSET_UTF8 : CHARSET_NATIVE); in RequestGetMessage()
/packages/apps/Dialer/java/com/android/dialer/callcomposer/camera/exif/
DCountedDataInputStream.java26 import java.nio.charset.Charset;
124 String readString(int n, Charset charset) throws IOException { in readString() argument
127 return new String(buf, charset); in readString()
/packages/apps/Messaging/src/com/android/messaging/sms/
DDatabaseMessages.java961 final int charset = cursor.getInt(INDEX_CHARSET); in get() local
967 charset); in get()
974 public static String getDecodedString(final byte[] data, final int charset) { in getDecodedString() argument
975 if (CharacterSets.ANY_CHARSET == charset) { in getDecodedString()
979 final String name = CharacterSets.getMimeName(charset); in getDecodedString()
994 public static byte[] getStringBytes(final String data, final int charset) { in getStringBytes() argument
995 if (CharacterSets.ANY_CHARSET == charset) { in getStringBytes()
999 final String name = CharacterSets.getMimeName(charset); in getStringBytes()
/packages/apps/Gallery2/gallerycommon/src/com/android/gallery3d/exif/
DCountedDataInputStream.java25 import java.nio.charset.Charset;
131 public String readString(int n, Charset charset) throws IOException { in readString() argument
134 return new String(buf, charset); in readString()
/packages/apps/Messaging/src/com/android/messaging/util/exif/
DCountedDataInputStream.java25 import java.nio.charset.Charset;
135 public String readString(int n, Charset charset) throws IOException { in readString() argument
138 return new String(buf, charset); in readString()
/packages/apps/Camera2/src/com/android/camera/exif/
DCountedDataInputStream.java25 import java.nio.charset.Charset;
131 public String readString(int n, Charset charset) throws IOException { in readString() argument
134 return new String(buf, charset); in readString()
/packages/apps/UnifiedEmail/src/org/apache/james/mime4j/
DBodyDescriptor.java37 private String charset = "us-ascii"; field in BodyDescriptor
137 charset = c.toLowerCase(); in addField()
357 return charset; in getCharset()

1234