public int write(ByteBuffer buffer, long loc)
{
checkIfClosed() ;
if ( loc < 0 || loc > bytes.limit() )
// Can write at loc = bytes()
throw new StorageException("Out of range: "+loc) ;
int x = bytes.position() ;
bytes.position((int)loc) ;
int len = write(buffer) ;
bytes.position(x) ;
return len ;