/** * Deserializes the object. * @param buf the data source. * @param offset the initial index for {@code buf}, inclusive. * @return the final index for {@code buf}, exclusive. * @throws BufferUnderflowException when {@code buf} is incomplete. (EOF) * @throws SecurityException on an upper limit breach defined by {@link #colferSizeMax}. * @throws InputMismatchException when the data does not match this object's schema. */ public int unmarshal(byte[] buf, int offset) { return unmarshal(buf, offset, buf.length); }
/** * Deserializes the object. * @param buf the data source. * @param offset the initial index for {@code buf}, inclusive. * @return the final index for {@code buf}, exclusive. * @throws BufferUnderflowException when {@code buf} is incomplete. (EOF) * @throws SecurityException on an upper limit breach defined by {@link #colferSizeMax}. * @throws InputMismatchException when the data does not match this object's schema. */ public int unmarshal(byte[] buf, int offset) { return unmarshal(buf, offset, buf.length); }
private void readObject(ObjectInputStream in) throws ClassNotFoundException, IOException { init(); int n = in.readInt(); byte[] buf = new byte[n]; in.readFully(buf); unmarshal(buf, 0); }
private void readObject(ObjectInputStream in) throws ClassNotFoundException, IOException { init(); int n = in.readInt(); byte[] buf = new byte[n]; in.readFully(buf); unmarshal(buf, 0); }
try { Span o = new Span(); this.offset = o.unmarshal(this.buf, this.offset, this.i); return o; } catch (BufferUnderflowException e) {
try { Span o = new Span(); this.offset = o.unmarshal(this.buf, this.offset, this.i); return o; } catch (BufferUnderflowException e) {