public static int unpackInt_i(ByteBuffer enc) { int value; if (Platform.BYTE_ORDER == Platform.BIG_ENDIAN) { value = decodeIntBigEndian(enc); } else { value = decodeIntLittleEndian(enc); } return value; }
/** * Decode a double in big-endian from a packed value * * @param encode string to get int from * @return the double value */ private static double decodeDoubleBigEndian(ByteBuffer encode) { return Double.longBitsToDouble(decodeLongBigEndian(encode)); }
public static ByteList packInt_i(ByteList result, int s) { if (Platform.BYTE_ORDER == Platform.BIG_ENDIAN) { encodeIntBigEndian(result, s); } else { encodeIntLittleEndian(result, s); } return result; }
int listSize = list.size(); int type = 0; int next = safeGet(format); next = safeGet(format); if (PACK_IGNORE_NULL_CODES.indexOf(type) != -1 && next == 0) { next = safeGetIgnoreNull(format); if (next == 0) break mainLoop; type = next; next = safeGet(format); if (next == 0) break mainLoop; type = next; next = safeGet(format); next = safeGet(format); if (PACK_IGNORE_NULL_CODES_WITH_MODIFIERS.indexOf(typeBeforeMap) != -1 && next == 0) { next = safeGetIgnoreNull(format); next = safeGet(format); next = safeGet(format); } else if (ASCII.isDigit(next)) { occurrences = 0; do { occurrences = occurrences * 10 + Character.digit((char)(next & 0xFF), 10); next = safeGet(format); } while (next != 0 && ASCII.isDigit(next));
int listSize = list.size(); int type; int next = safeGet(format); next = safeGet(format); if (PACK_IGNORE_NULL_CODES.indexOf(type) != -1 && next == 0) { next = safeGetIgnoreNull(format); if (next == 0) break mainLoop; type = next; next = safeGet(format); if (next == 0) break mainLoop; type = next; next = safeGet(format); next = safeGet(format); if (PACK_IGNORE_NULL_CODES_WITH_MODIFIERS.indexOf(typeBeforeMap) != -1 && next == 0) { next = safeGetIgnoreNull(format); next = safeGet(format); next = safeGet(format); } else if (ASCII.isDigit(next)) { occurrences = 0; do { occurrences = occurrences * 10 + Character.digit((char)(next & 0xFF), 10); next = safeGet(format); } while (next != 0 && ASCII.isDigit(next));
int next = safeGet(format); next = safeGet(format); if (UNPACK_IGNORE_NULL_CODES.indexOf(type) != -1 && next == 0) { next = safeGetIgnoreNull(format); if (next == 0) break mainLoop; type = next; next = safeGet(format); next = safeGet(format); next = safeGet(format); if (next == '_' || next == '!') next = safeGet(format); if (next == '*') { occurrences = IS_STAR; next = safeGet(format); } else if (ASCII.isDigit(next)) { occurrences = 0; do { occurrences = occurrences * 10 + Character.digit((char)(next & 0xFF), 10); next = safeGet(format); } while (next != 0 && ASCII.isDigit(next)); } else { decode(context, runtime, encode, occurrences, result, block, converter); type = next;
/** * Encode a long in big-endian format into a packed value * * @param result to pack long into * @param l is the long to encode */ private static void encodeLongBigEndian(ByteList result, long l) { encodeIntBigEndian(result, (int) (l >>> 32)); encodeIntBigEndian(result, (int) (l & 0xffffffff)); }
/** * Encode a long in little-endian format into a packed value * * @param result to pack long into * @param l is the long to encode */ private static void encodeLongLittleEndian(ByteList result, long l) { encodeIntLittleEndian(result, (int) (l & 0xffffffff)); encodeIntLittleEndian(result, (int) (l >>> 32)); }
/** * Decode a long in little-endian format from a packed value * * @param encode string to get int from * @return the long value */ private static long decodeLongLittleEndian(ByteBuffer encode) { int c1 = decodeIntLittleEndian(encode); int c2 = decodeIntLittleEndian(encode); return ((long) c2 << 32) + (c1 & 0xffffffffL); }
/** * Decode a long in big-endian format from a packed value * * @param encode string to get int from * @return the long value */ private static long decodeLongBigEndian(ByteBuffer encode) { int c1 = decodeIntBigEndian(encode); int c2 = decodeIntBigEndian(encode); return ((long) c1 << 32) + (c2 & 0xffffffffL); }
/** * Encode a double in big-endian format into a packed value * * @param result to pack double into * @param d is the double to encode */ private static void encodeDoubleBigEndian(ByteList result, double d) { encodeLongBigEndian(result, Double.doubleToRawLongBits(d)); }
/** * Encode a double in little endian format into a packed value * * @param result to pack double into * @param d is the double to encode */ private static void encodeDoubleLittleEndian(ByteList result, double d) { encodeLongLittleEndian(result, Double.doubleToRawLongBits(d)); }
/** * Decode a double from a packed value * * @param encode string to get int from * @return the double value */ private static double decodeDoubleLittleEndian(ByteBuffer encode) { return Double.longBitsToDouble(decodeLongLittleEndian(encode)); }
int listSize = list.size(); int type = 0; int next = safeGet(format); next = safeGet(format); if (PACK_IGNORE_NULL_CODES.indexOf(type) != -1 && next == 0) { next = safeGetIgnoreNull(format); if (next == 0) break mainLoop; type = next; next = safeGet(format); if (next == 0) break mainLoop; type = next; next = safeGet(format); next = safeGet(format); if (PACK_IGNORE_NULL_CODES_WITH_MODIFIERS.indexOf(typeBeforeMap) != -1 && next == 0) { next = safeGetIgnoreNull(format); next = safeGet(format); next = safeGet(format); } else if (ASCII.isDigit(next)) { occurrences = 0; do { occurrences = occurrences * 10 + Character.digit((char)(next & 0xFF), 10); next = safeGet(format); } while (next != 0 && ASCII.isDigit(next));
int listSize = list.size(); int type; int next = safeGet(format); next = safeGet(format); if (PACK_IGNORE_NULL_CODES.indexOf(type) != -1 && next == 0) { next = safeGetIgnoreNull(format); if (next == 0) break mainLoop; type = next; next = safeGet(format); if (next == 0) break mainLoop; type = next; next = safeGet(format); next = safeGet(format); if (PACK_IGNORE_NULL_CODES_WITH_MODIFIERS.indexOf(typeBeforeMap) != -1 && next == 0) { next = safeGetIgnoreNull(format); next = safeGet(format); next = safeGet(format); } else if (ASCII.isDigit(next)) { occurrences = 0; do { occurrences = occurrences * 10 + Character.digit((char)(next & 0xFF), 10); next = safeGet(format); } while (next != 0 && ASCII.isDigit(next));
int next = safeGet(format); next = safeGet(format); if (UNPACK_IGNORE_NULL_CODES.indexOf(type) != -1 && next == 0) { next = safeGetIgnoreNull(format); if (next == 0) break mainLoop; type = next; next = safeGet(format); next = safeGet(format); next = safeGet(format); if (next == '_' || next == '!') next = safeGet(format); if (next == '*') { occurrences = IS_STAR; next = safeGet(format); } else if (ASCII.isDigit(next)) { occurrences = 0; do { occurrences = occurrences * 10 + Character.digit((char)(next & 0xFF), 10); next = safeGet(format); } while (next != 0 && ASCII.isDigit(next)); } else { decode(context, runtime, encode, occurrences, result, block, converter); type = next;
/** * Encode a long in big-endian format into a packed value * * @param result to pack long into * @param l is the long to encode */ private static void encodeLongBigEndian(ByteList result, long l) { encodeIntBigEndian(result, (int) (l >>> 32)); encodeIntBigEndian(result, (int) (l & 0xffffffff)); }
/** * Encode a long in little-endian format into a packed value * * @param result to pack long into * @param l is the long to encode */ private static void encodeLongLittleEndian(ByteList result, long l) { encodeIntLittleEndian(result, (int) (l & 0xffffffff)); encodeIntLittleEndian(result, (int) (l >>> 32)); }
/** * Decode a long in little-endian format from a packed value * * @param encode string to get int from * @return the long value */ private static long decodeLongLittleEndian(ByteBuffer encode) { int c1 = decodeIntLittleEndian(encode); int c2 = decodeIntLittleEndian(encode); return ((long) c2 << 32) + (c1 & 0xffffffffL); }
/** * Decode a long in big-endian format from a packed value * * @param encode string to get int from * @return the long value */ private static long decodeLongBigEndian(ByteBuffer encode) { int c1 = decodeIntBigEndian(encode); int c2 = decodeIntBigEndian(encode); return ((long) c1 << 32) + (c2 & 0xffffffffL); }