public static int readCollectionSize(ByteBuffer input, int version) { return version >= Server.VERSION_3 ? input.getInt() : ByteBufferUtil.readShortLength(input); }
/** * @param in data input * @throws IOException if an I/O error occurs. */ public static void skipShortLength(DataInputPlus in) throws IOException { int skip = readShortLength(in); in.skipBytesFully(skip); }
/** * @param in data input * @throws IOException if an I/O error occurs. */ public static void skipShortLength(DataInputPlus in) throws IOException { int skip = readShortLength(in); in.skipBytesFully(skip); }
/** * @param in data input * @throws IOException if an I/O error occurs. */ public static void skipShortLength(DataInputPlus in) throws IOException { int skip = readShortLength(in); in.skipBytesFully(skip); }
public static ByteBuffer readBytesWithShortLength(ByteBuffer bb) { int length = readShortLength(bb); return readBytes(bb, length); }
/** * @param in data input * @return An unsigned short in an integer. * @throws IOException if an I/O error occurs. */ public static ByteBuffer readWithShortLength(DataInput in) throws IOException { return ByteBufferUtil.read(in, readShortLength(in)); }
private static boolean readStatic(ByteBuffer bb) { if (bb.remaining() < 2) return false; int header = ByteBufferUtil.getShortLength(bb, bb.position()); if ((header & 0xFFFF) != STATIC_MARKER) return false; ByteBufferUtil.readShortLength(bb); // Skip header return true; }
private static boolean readStatic(ByteBuffer bb) { if (bb.remaining() < 2) return false; int header = ByteBufferUtil.getShortLength(bb, bb.position()); if ((header & 0xFFFF) != STATIC_MARKER) return false; ByteBufferUtil.readShortLength(bb); // Skip header return true; }
/** * @param in data input * @return null * @throws IOException if an I/O error occurs. */ public static ByteBuffer skipShortLength(DataInput in) throws IOException { int skip = readShortLength(in); FileUtils.skipBytesFully(in, skip); return null; }
/** * @param in data input * @return An unsigned short in an integer. * @throws IOException if an I/O error occurs. */ public static ByteBuffer readWithShortLength(DataInput in) throws IOException { return ByteBufferUtil.read(in, readShortLength(in)); }
private static boolean readStatic(ByteBuffer bb) { if (bb.remaining() < 2) return false; int header = ByteBufferUtil.getShortLength(bb, bb.position()); if ((header & 0xFFFF) != STATIC_MARKER) return false; ByteBufferUtil.readShortLength(bb); // Skip header return true; }
/** * @param in data input * @return An unsigned short in an integer. * @throws IOException if an I/O error occurs. */ public static ByteBuffer readWithShortLength(DataInput in) throws IOException { return ByteBufferUtil.read(in, readShortLength(in)); }
public static ByteBuffer readBytesWithShortLength(ByteBuffer bb) { int length = readShortLength(bb); return readBytes(bb, length); }
/** * @param in data input * @throws IOException if an I/O error occurs. */ public static void skipShortLength(DataInputPlus in) throws IOException { int skip = readShortLength(in); in.skipBytesFully(skip); }
/** * @param in data input * @return An unsigned short in an integer. * @throws IOException if an I/O error occurs. */ public static ByteBuffer readWithShortLength(DataInput in) throws IOException { return ByteBufferUtil.read(in, readShortLength(in)); }
public static ByteBuffer readBytesWithShortLength(ByteBuffer bb) { int length = readShortLength(bb); return readBytes(bb, length); }
/** * @param in data input * @return An unsigned short in an integer. * @throws IOException if an I/O error occurs. */ public static ByteBuffer readWithShortLength(DataInput in) throws IOException { return ByteBufferUtil.read(in, readShortLength(in)); }
public static ByteBuffer readBytesWithShortLength(ByteBuffer bb) { int length = readShortLength(bb); return readBytes(bb, length); }
private static boolean readStatic(ByteBuffer bb) { if (bb.remaining() < 2) return false; int header = ByteBufferUtil.getShortLength(bb, bb.position()); if ((header & 0xFFFF) != STATIC_MARKER) return false; ByteBufferUtil.readShortLength(bb); // Skip header return true; }
/** * @param in data input * @return An unsigned short in an integer. * @throws IOException if an I/O error occurs. */ public static ByteBuffer readWithShortLength(DataInput in) throws IOException { return ByteBufferUtil.read(in, readShortLength(in)); }