ome.io.nio
Class FileBuffer

java.lang.Object
  extended by ome.io.nio.AbstractBuffer
      extended by ome.io.nio.FileBuffer

public class FileBuffer
extends AbstractBuffer

Raw file buffer which provides I/O operations within the OMERO file repository.

Since:
OMERO3.0
Version:
3.0 (Internal version: $Revision: 6900 $ $Date: 2005/06/08 15:21:59 $)
Author:
Chris Allan      callan@blackcat.ca

Method Summary
 void close()
          Closes the buffer, cleaning up file state.
 int read(ByteBuffer dst)
          Delegates to FileChannel
 int read(ByteBuffer dst, long position)
          Delegates to FileChannel
 long size()
           
 void truncate(long size)
           
 int write(ByteBuffer src)
          Delegates to FileChannel
 int write(ByteBuffer src, long position)
          Delegates to FileChannel
 
Methods inherited from class ome.io.nio.AbstractBuffer
getPath, toString
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Method Detail

close

public void close()
           throws IOException
Closes the buffer, cleaning up file state.

Throws:
IOException - if an I/O error occurs.

read

public int read(ByteBuffer dst)
         throws IOException
Delegates to FileChannel

Throws:
IOException
See Also:
FileChannel

read

public int read(ByteBuffer dst,
                long position)
         throws IOException
Delegates to FileChannel

Throws:
IOException
See Also:
FileChannel

write

public int write(ByteBuffer src,
                 long position)
          throws IOException
Delegates to FileChannel

Throws:
IOException
See Also:
FileChannel

write

public int write(ByteBuffer src)
          throws IOException
Delegates to FileChannel

Throws:
IOException
See Also:
FileChannel

size

public long size()
          throws IOException
Throws:
IOException

truncate

public void truncate(long size)
              throws IOException
Throws:
IOException


OmeroJava Api

Version: Beta-4.2.0-r7571-b29

Copyright © 2009 The University of Dundee. All Rights Reserved.