Re: Using the DataOutput/InputBuffer classes

2007-07-27 Thread Brian Harrington
From the apidocs for DataOutputBuffer: "Returns the current contents of the buffer. Data is only valid to |getLength()| ." Try: raf.write(buffer.getData(), 0, buffer.getLength()); Brian Phantom w

Using the DataOutput/InputBuffer classes

2007-07-27 Thread Phantom
Hi All I have been trying to use the DataOutputBuffer class for its obvious memory efficiency. I basically write some data into the buffer and then write the buffer into a file (an instance of RandomAccessFile) by invoking buffer.getData(). However what I am seeing is that a lot of garbage is bein