protected byte[] looseUnmarshalConstByteArray(DataByteArrayInputStream dataIn, int i) throws IOException { byte data[] = new byte[i]; dataIn.readFully(data); return data; }
protected byte[] looseUnmarshalConstByteArray(DataByteArrayInputStream dataIn, int i) throws IOException { byte data[] = new byte[i]; dataIn.readFully(data); return data; }
protected byte[] tightUnmarshalConstByteArray(DataByteArrayInputStream dataIn, BooleanStream bs, int i) throws IOException { byte data[] = new byte[i]; dataIn.readFully(data); return data; }
protected byte[] tightUnmarshalConstByteArray(DataByteArrayInputStream dataIn, BooleanStream bs, int i) throws IOException { byte data[] = new byte[i]; dataIn.readFully(data); return data; }
protected byte[] looseUnmarshalByteArray(DataByteArrayInputStream dataIn) throws IOException { byte rc[] = null; if (dataIn.readBoolean()) { int size = dataIn.readInt(); rc = new byte[size]; dataIn.readFully(rc); } return rc; }
protected byte[] tightUnmarshalByteArray(DataByteArrayInputStream dataIn, BooleanStream bs) throws IOException { byte rc[] = null; if (bs.readBoolean()) { int size = dataIn.readInt(); rc = new byte[size]; dataIn.readFully(rc); } return rc; }
private Buffer readBuffer(DataByteArrayInputStream bais) throws IOException { byte b[] = new byte[bais.readVarInt()]; bais.readFully(b); return new Buffer(b); }
private Buffer readBuffer(DataByteArrayInputStream bais) throws IOException { byte b[] = new byte[bais.readVarInt()]; bais.readFully(b); return new Buffer(b); }
protected byte[] looseUnmarshalByteArray(DataByteArrayInputStream dataIn) throws IOException { byte rc[] = null; if (dataIn.readBoolean()) { int size = dataIn.readInt(); rc = new byte[size]; dataIn.readFully(rc); } return rc; }
protected byte[] tightUnmarshalByteArray(DataByteArrayInputStream dataIn, BooleanStream bs) throws IOException { byte rc[] = null; if (bs.readBoolean()) { int size = dataIn.readInt(); rc = new byte[size]; dataIn.readFully(rc); } return rc; }
/** * @param in * @return an Object * @throws IOException */ public static Object readObject(DataByteArrayInputStream in) throws IOException { Object result = null; int len = in.readInt(); if (len > 0) { byte[] rawData = new byte[len]; in.readFully(rawData); InputStream is = new ByteArrayInputStream(rawData); DataInputStream dataIn = new DataInputStream(is); ClassLoadingAwareObjectInputStream objIn = new ClassLoadingAwareObjectInputStream(dataIn); try { result = objIn.readObject(); } catch (ClassNotFoundException e) { IOException ex = new IOException("Class not Found " + e.getMessage()); ex.initCause(e); throw ex; } } return result; }
/** * @param in * @return an Object * @throws IOException */ public static Object readObject(DataByteArrayInputStream in) throws IOException { Object result = null; int len = in.readInt(); if (len > 0) { byte[] rawData = new byte[len]; in.readFully(rawData); InputStream is = new ByteArrayInputStream(rawData); DataInputStream dataIn = new DataInputStream(is); ClassLoadingAwareObjectInputStream objIn = new ClassLoadingAwareObjectInputStream(dataIn); try { result = objIn.readObject(); } catch (ClassNotFoundException e) { IOException ex = new IOException("Class not Found " + e.getMessage()); ex.initCause(e); throw ex; } } return result; }
protected Buffer looseUnmarshalBuffer(DataByteArrayInputStream dataIn) throws IOException { Buffer rc = null; if (dataIn.readBoolean()) { int size = dataIn.readInt(); byte[] t = new byte[size]; dataIn.readFully(t); rc = new Buffer(t, 0, size); } return rc; } }
protected Buffer looseUnmarshalBuffer(DataByteArrayInputStream dataIn) throws IOException { Buffer rc = null; if (dataIn.readBoolean()) { int size = dataIn.readInt(); byte[] t = new byte[size]; dataIn.readFully(t); rc = new Buffer(t, 0, size); } return rc; } }
protected Buffer tightUnmarshalBuffer(DataByteArrayInputStream dataIn, BooleanStream bs) throws IOException { Buffer rc = null; if (bs.readBoolean()) { int size = dataIn.readInt(); byte[] t = new byte[size]; dataIn.readFully(t); return new Buffer(t, 0, size); } return rc; }
protected Buffer tightUnmarshalBuffer(DataByteArrayInputStream dataIn, BooleanStream bs) throws IOException { Buffer rc = null; if (bs.readBoolean()) { int size = dataIn.readInt(); byte[] t = new byte[size]; dataIn.readFully(t); return new Buffer(t, 0, size); } return rc; }
private int readFields(DataByteArrayInputStream is) { is.readFully(magic); base_revision = is.readLong(); page_size = is.readInt(); free_list_page = is.readInt(); pessimistic_recovery_page = is.readInt(); optimistic_recovery_page = is.readInt(); int length = is.getPos(); return length; }
private int readFields(DataByteArrayInputStream is) { is.readFully(magic); base_revision = is.readLong(); page_size = is.readInt(); free_list_page = is.readInt(); pessimistic_recovery_page = is.readInt(); optimistic_recovery_page = is.readInt(); int length = is.getPos(); return length; }
his.readFully(magic.data, magic.offset, magic.length()); if( !magic.ascii().equals(HAWT_DB_PAGE_FILE_MAGIC)) { throw new IOPagingException("File's magic does not match expected value");
his.readFully(magic.data, magic.offset, magic.length()); if( !magic.ascii().equals(HAWT_DB_PAGE_FILE_MAGIC)) { throw new IOPagingException("File's magic does not match expected value");