FmqChunk { public FmqChunk (final byte[] content, int size) { this.data = ByteBuffer.allocate (size); if (content != null) { data.put (content); } } FmqChunk(final byte[] content, int size); void destroy(); int fill(byte filler, int size); int size(); int maxSize(); byte [] data(); static FmqChunk read(FileChannel handle, int bytes); boolean write(FileChannel handle);  }
@Test public void testFmqChunk () { System.out.printf (" * fmq_chunk: "); FmqChunk chunk = new FmqChunk ("1234567890".getBytes (), 10); assertEquals (chunk.size (), 10); assertEquals (new String (chunk.data ()), "1234567890"); chunk.destroy (); System.out.printf ("OK\n"); }