/** reserve at least len bytes at the end of the buffer. * Invalid if len > buffer.length */ public void reserve(int len) throws IOException { if (len > (buf.length - pos)) flushBuffer(); }
@Override public void close() throws IOException { if (daos != null) { daos.flushBuffer(); } } }
/** reserve at least len bytes at the end of the buffer. * Invalid if len > buffer.length * @param len */ public void reserve(int len) throws IOException { if (len > (buf.length - pos)) flushBuffer(); }
/** reserve at least len bytes at the end of the buffer. * Invalid if len > buffer.length */ public void reserve(int len) throws IOException { if (len > (buf.length - pos)) flushBuffer(); }
@Override public void flush() throws IOException { flushBuffer(); if (out != null) out.flush(); }
@Override public void close() throws IOException { flushBuffer(); if (out != null) out.close(); }
@Override public void flush() throws IOException { flushBuffer(); out.flush(); }
@Override public void close() throws IOException { flushBuffer(); out.close(); }
@Override public void close() throws IOException { flushBuffer(); if (out != null) out.close(); }
@Override public void flush() throws IOException { flushBuffer(); if (out != null) out.flush(); }
public void marshal(Object nl, OutputStream os) throws IOException { try { initWrite(os); writeVal(nl); } finally { alreadyMarshalled = true; daos.flushBuffer(); } }
public void marshal(NamedList nl, OutputStream os) throws IOException { daos = FastOutputStream.wrap(os); try { daos.writeByte(VERSION); writeNamedList(nl); } finally { daos.flushBuffer(); } }
public void marshal(Object nl, OutputStream os) throws IOException { init(FastOutputStream.wrap(os)); try { daos.writeByte(VERSION); writeVal(nl); } finally { daos.flushBuffer(); } }
@Override public void write(DataOutput out) throws IOException { JavaBinCodec codec = new JavaBinCodec(); FastOutputStream daos = FastOutputStream.wrap(DataOutputOutputStream.constructOutputStream(out)); codec.init(daos); try { codec.writeVal(sid); } finally { daos.flushBuffer(); } }
@Override public void write(DataOutput out) throws IOException { JavaBinCodec codec = new JavaBinCodec(); FastOutputStream daos = FastOutputStream.wrap(DataOutputOutputStream.constructOutputStream(out)); codec.init(daos); try { codec.writeVal(sid); } finally { daos.flushBuffer(); } }
@Override public void write(DataOutput out) throws IOException { JavaBinCodec codec = new JavaBinCodec(); FastOutputStream daos = FastOutputStream.wrap(DataOutputOutputStream.constructOutputStream(out)); codec.init(daos); try { codec.writeVal(sid); } finally { daos.flushBuffer(); } }