private EzyByteBuffer getRemainBytes(EzyByteBuffer old) { if (!old.hasRemaining()) { return(null); } byte[] bytes = new byte[old.remaining()]; old.get(bytes); return(EzyByteBuffer.wrap(bytes)); }
public T deserialize <T>(MemoryStream stream) { Object answer = deserialize(EzyByteBuffer.wrap(stream)); return((T)answer); }
private EzyByteBuffer newBuffer(byte[] bytes) { return(EzyByteBuffer.wrap(bytes)); }