Lines Matching refs:offset
244 private static String decodeUtf8(byte[] data, int offset, int numFields) in decodeUtf8() argument
246 return decodeCharset(data, offset, numFields, 1, "UTF-8"); in decodeUtf8()
249 private static String decodeUtf16(byte[] data, int offset, int numFields) in decodeUtf16() argument
252 int padding = offset % 2; in decodeUtf16()
253 numFields -= (offset + padding) / 2; in decodeUtf16()
254 return decodeCharset(data, offset, numFields, 2, "utf-16be"); in decodeUtf16()
257 private static String decodeCharset(byte[] data, int offset, int numFields, int width, in decodeCharset() argument
259 if (numFields < 0 || (numFields * width + offset) > data.length) { in decodeCharset()
261 int padding = offset % width; in decodeCharset()
262 int maxNumFields = (data.length - offset - padding) / width; 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()
278 private static String decode7bitAscii(byte[] data, int offset, int numFields) in decode7bitAscii() argument
281 int offsetBits = offset * 8; in decode7bitAscii()
313 private static String decode7bitGsm(byte[] data, int offset, int numFields) in decode7bitGsm() argument
316 int offsetBits = offset * 8; in decode7bitGsm()
320 String result = GsmAlphabet.gsm7BitPackedToString(data, offset, numFields, in decode7bitGsm()
328 private static String decodeLatin(byte[] data, int offset, int numFields) in decodeLatin() argument
330 return decodeCharset(data, offset, numFields, 1, "ISO-8859-1"); in decodeLatin()
333 private static String decodeShiftJis(byte[] data, int offset, int numFields) in decodeShiftJis() argument
335 return decodeCharset(data, offset, numFields, 1, "Shift_JIS"); in decodeShiftJis()
338 private static String decodeGsmDcs(byte[] data, int offset, int numFields, in decodeGsmDcs() argument
348 return decode7bitGsm(data, offset, numFields); in decodeGsmDcs()
350 return decodeUtf8(data, offset, numFields); in decodeGsmDcs()
352 return decodeUtf16(data, offset, numFields); in decodeGsmDcs()
361 int offset = 0; in decodeUserDataPayload() local
364 offset += udhLen + 1; in decodeUserDataPayload()
391 userData.payloadStr = decodeLatin(userData.payload, offset, userData.numFields); in decodeUserDataPayload()
393 userData.payloadStr = decodeUtf8(userData.payload, offset, userData.numFields); in decodeUserDataPayload()
399 userData.payloadStr = decode7bitAscii(userData.payload, offset, userData.numFields); in decodeUserDataPayload()
402 userData.payloadStr = decodeUtf16(userData.payload, offset, userData.numFields); in decodeUserDataPayload()
405 userData.payloadStr = decode7bitGsm(userData.payload, offset, in decodeUserDataPayload()
409 userData.payloadStr = decodeLatin(userData.payload, offset, userData.numFields); in decodeUserDataPayload()
412 userData.payloadStr = decodeShiftJis(userData.payload, offset, userData.numFields); in decodeUserDataPayload()
415 userData.payloadStr = decodeGsmDcs(userData.payload, offset, in decodeUserDataPayload()