Home
last modified time | relevance | path

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

1234

/packages/apps/Bluetooth/src/com/android/bluetooth/map/
DBluetoothMapUtils.java25 import java.nio.charset.Charset;
26 import java.nio.charset.IllegalCharsetNameException;
461 String charset; in stripEncoding() local
467 charset = m.group(1); in stripEncoding()
471 "Matching:" + match + "\nCharset: " + charset + "\nEncoding : " + encoding in stripEncoding()
476 str = new String(quotedPrintableToUtf8(encodedText, charset)); in stripEncoding()
484 Base64.decode(encodedText.getBytes(charset), Base64.DEFAULT), in stripEncoding()
485 charset); in stripEncoding()
489 Log.e(TAG, "stripEncoding: Unsupported charset: " + charset); in stripEncoding()
509 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/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/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/tests/unit/src/com/android/bluetooth/avrcpcontroller/bip/
DBipAttachmentFormatTest.java49 private void testParse(String contentType, String charset, String name, String size, in testParse() argument
53 BipAttachmentFormat attachment = new BipAttachmentFormat(contentType, charset, name, in testParse()
56 Assert.assertEquals(charset, attachment.getCharset()); in testParse()
75 private void testCreate(String contentType, String charset, String name, int size, in testCreate() argument
77 BipAttachmentFormat attachment = new BipAttachmentFormat(contentType, charset, name, in testCreate()
80 Assert.assertEquals(charset, attachment.getCharset()); in testCreate()
/packages/apps/Bluetooth/src/com/android/bluetooth/avrcpcontroller/bip/
DBipAttachmentFormat.java70 public BipAttachmentFormat(String contentType, String charset, String name, String size, in BipAttachmentFormat() argument
81 mCharset = charset; in BipAttachmentFormat()
101 public BipAttachmentFormat(String contentType, String charset, String name, int size, in BipAttachmentFormat() argument
105 mCharset = charset; in BipAttachmentFormat()
DBipImageProperties.java194 String charset = xpp.getAttributeValue(null, "charset"); in parse() local
199 new BipAttachmentFormat(contentType, charset, name, size, in parse()
314 String charset = format.getCharset(); in toString() local
325 if (charset != null) { in toString()
326 xmlMsgElement.attribute(null, "charset", charset.toString()); in toString()
/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()
DRequestPushMessage.java43 RequestPushMessage(String folder, Bmessage msg, CharsetType charset, boolean transparent, in RequestPushMessage() argument
50 oap.add(OAP_TAGID_CHARSET, charset == CharsetType.NATIVE ? CHARSET_NATIVE : CHARSET_UTF8); in RequestPushMessage()
DBmessage.java123 public Bmessage setCharset(String charset) { in setCharset() argument
124 mBbodyCharset = charset; in setCharset()
/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/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/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/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/modules/CellBroadcastService/src/com/android/cellbroadcastservice/
DBearerData.java258 String charset) throws CodingException { in decodeCharset() argument
264 throw new CodingException(charset + " decode failed: offset out of range"); in decodeCharset()
266 Log.e(LOG_TAG, charset + " decode error: offset = " + offset + " numFields = " in decodeCharset()
272 return new String(data, offset, numFields * width, charset); in decodeCharset()
274 throw new CodingException(charset + " decode failed: " + ex); in decodeCharset()
/packages/apps/Settings/src/com/android/settings/wifi/qrcode/
DQrCodeGenerator.java28 import java.nio.charset.CharsetEncoder;
29 import java.nio.charset.StandardCharsets;

1234