Home
last modified time | relevance | path

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

12345678910

/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()
/packages/modules/Wifi/service/java/com/android/server/wifi/
DByteBufferReader.java24 import java.nio.charset.Charset;
79 public static String readString(ByteBuffer payload, int length, Charset charset) { in readString() argument
82 return new String(octets, charset); in readString()
94 public static String readStringWithByteLength(ByteBuffer payload, Charset charset) { in readStringWithByteLength() argument
96 return readString(payload, length, charset); in readStringWithByteLength()
/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/modules/Wifi/framework/java/android/net/wifi/
DWifiSsid.java28 import java.nio.charset.Charset;
29 import java.nio.charset.CharsetDecoder;
30 import java.nio.charset.CoderResult;
31 import java.nio.charset.CodingErrorAction;
197 Charset charset = Charset.forName("UTF-8"); in toString()
198 CharsetDecoder decoder = charset.newDecoder() in toString()
/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.java206 String charset = xpp.getAttributeValue(null, "charset"); in parse() local
211 new BipAttachmentFormat(contentType, charset, name, size, in parse()
360 String charset = format.getCharset(); in toString() local
371 if (charset != null) { in toString()
372 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()
/packages/modules/CellBroadcastService/src/com/android/cellbroadcastservice/
DGsmAlphabet.java24 import java.nio.charset.Charset;
760 Charset charset = null; in gsm8BitUnpackedToString() local
767 charset = Charset.forName(characterset); in gsm8BitUnpackedToString()
820 ret.append(charset.decode(mbcsBuffer).toString()); in gsm8BitUnpackedToString()
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/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/modules/Wifi/service/java/com/android/server/wifi/util/
DNativeUtil.java28 import java.nio.charset.CharacterCodingException;
29 import java.nio.charset.CharsetDecoder;
30 import java.nio.charset.CharsetEncoder;
31 import java.nio.charset.StandardCharsets;
/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()

12345678910