Lines Matching refs:numFields
237 bData.userData.numFields = inStream.read(8); in decodeUserData()
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
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()
267 + numFields + " data.length = " + data.length + " maxNumFields = " in decodeCharset()
269 numFields = maxNumFields; 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
283 numFields -= offsetSeptets; in decode7bitAscii()
285 StringBuffer strBuf = new StringBuffer(numFields); in decode7bitAscii()
287 int wantedBits = (offsetSeptets * 7) + (numFields * 7); in decode7bitAscii()
293 for (int i = 0; i < numFields; i++) { in decode7bitAscii()
313 private static String decode7bitGsm(byte[] data, int offset, int numFields) in decode7bitGsm() argument
318 numFields -= offsetSeptets; 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()
380 byte[] payload = new byte[userData.numFields]; in decodeUserDataPayload()
381 int copyLen = userData.numFields < userData.payload.length in decodeUserDataPayload()
382 ? userData.numFields : userData.payload.length; 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()
406 userData.numFields); in decodeUserDataPayload()
409 userData.payloadStr = decodeLatin(userData.payload, offset, userData.numFields); in decodeUserDataPayload()
412 userData.payloadStr = decodeShiftJis(userData.payload, offset, userData.numFields); in decodeUserDataPayload()
416 userData.numFields, userData.msgType); in decodeUserDataPayload()
519 int numFields; // number of chars to decode in decodeCmasUserData() local
523 numFields = recordLen - 1; // subtract 1 byte for encoding in decodeCmasUserData()
529 numFields = ((recordLen * 8) - 5) / 7; // subtract 5 bits for encoding in decodeCmasUserData()
533 numFields = (recordLen - 1) / 2; in decodeCmasUserData()
537 numFields = 0; // unsupported encoding in decodeCmasUserData()
540 alertUserData.numFields = numFields; in decodeCmasUserData()