Home
last modified time | relevance | path

Searched refs:charset (Results 1 – 25 of 85) 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/services/Telephony/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/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/Bluetooth/src/com/android/bluetooth/map/
DBluetoothMapUtils.java25 import java.nio.charset.Charset;
26 import java.nio.charset.IllegalCharsetNameException;
438 String charset; in stripEncoding() local
444 charset = m.group(1); in stripEncoding()
447 Log.v(TAG, "Matching:" + match +"\nCharset: "+charset +"\nEncoding : " +encoding in stripEncoding()
452 str = new String(quotedPrintableToUtf8(encodedText,charset)); in stripEncoding()
459 str = new String(Base64.decode(encodedText.getBytes(charset), in stripEncoding()
460 Base64.DEFAULT), charset); in stripEncoding()
464 Log.e(TAG, "stripEncoding: Unsupported charset: " + charset); in stripEncoding()
484 public static byte[] quotedPrintableToUtf8(String text, String charset) { in quotedPrintableToUtf8() argument
[all …]
DBluetoothMapbMessageMime.java18 import java.nio.charset.Charset;
19 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) == false) { 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/services/Telephony/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/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/services/Telephony/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 …]
/packages/services/Telephony/src/com/android/phone/common/mail/utils/
DUtility.java21 import java.nio.charset.Charset;
59 private static byte[] encode(Charset charset, String s) { in encode() argument
63 final ByteBuffer buffer = charset.encode(CharBuffer.wrap(s)); in encode()
69 private static String decode(Charset charset, byte[] b) { in decode() argument
73 final CharBuffer cb = charset.decode(ByteBuffer.wrap(b)); in decode()
/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/services/Telephony/src/com/android/phone/common/mail/internet/
DMimeUtility.java242 String charset = getHeaderParameter(part.getContentType(), "charset"); in getTextFromPart() local
243 if (charset != null) { in getTextFromPart()
247 charset = CharsetUtil.toJavaCharset(charset); in getTextFromPart()
252 if (charset == null) { in getTextFromPart()
253 charset = "ASCII"; in getTextFromPart()
258 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()
/packages/apps/Launcher3/WallpaperPicker/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/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/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/services/Telephony/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()
/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