## org.h2.store.fs
Class RecordingFileObject

    java.lang.Object
      org.h2.store.fs.RecordingFileObject

All Implemented Interfaces:
  FileObject

    public class RecordingFileObject

extends java.lang.Object
implements FileObject

A file object that records all write operations and can re-play them.

Method Summary
`void` `close()` Close the file.
`long` `getFilePointer()` Get the file pointer.
`java.lang.String` `getName()` Get the full qualified name of this file.
`long` `length()` Get the length of the file.
`void` `readFully(byte[] b, int off, int len)` Read from the file.
`void` `releaseLock()` Release the file lock.
`void` `seek(long pos)` Go to the specified position in the file.
`void` `setFileLength(long newLength)` Change the length of the file.
`void` `sync()` Force changes to the physical location.
`boolean` `tryLock()` Try to lock the file exclusively.
`void` `write(byte[] b, int off, int len)` Write to the file.

Methods inherited from class java.lang.Object
`clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

Method Detail

### close

    public void close()
               throws java.io.IOException

  Description copied from interface: `FileObject`
  Close the file.

  Specified by:
    `close` in interface `FileObject`
  Throws:
    `java.io.IOException`

### getFilePointer

    public long getFilePointer()
                        throws java.io.IOException

  Description copied from interface: `FileObject`
  Get the file pointer.

  Specified by:
    `getFilePointer` in interface `FileObject`
  Returns:
    the current file pointer
  Throws:
    `java.io.IOException`

### getName

    public java.lang.String getName()

  Description copied from interface: `FileObject`
  Get the full qualified name of this file.

  Specified by:
    `getName` in interface `FileObject`
  Returns:
    the name

### length

    public long length()
                throws java.io.IOException

  Description copied from interface: `FileObject`
  Get the length of the file.

  Specified by:
    `length` in interface `FileObject`
  Returns:
    the length
  Throws:
    `java.io.IOException`

### readFully

    public void readFully(byte[] b,
                          int off,
                          int len)
                   throws java.io.IOException

  Description copied from interface: `FileObject`
  Read from the file.

  Specified by:
    `readFully` in interface `FileObject`
  Parameters:
    `b` - the byte array
    `off` - the offset
    `len` - the number of bytes
  Throws:
    `java.io.IOException`

### seek

    public void seek(long pos)
              throws java.io.IOException

  Description copied from interface: `FileObject`
  Go to the specified position in the file.

  Specified by:
    `seek` in interface `FileObject`
  Parameters:
    `pos` - the new position
  Throws:
    `java.io.IOException`

### setFileLength

    public void setFileLength(long newLength)
                       throws java.io.IOException

  Description copied from interface: `FileObject`
  Change the length of the file.

  Specified by:
    `setFileLength` in interface `FileObject`
  Parameters:
    `newLength` - the new length
  Throws:
    `java.io.IOException`

### sync

    public void sync()
              throws java.io.IOException

  Description copied from interface: `FileObject`
  Force changes to the physical location.

  Specified by:
    `sync` in interface `FileObject`
  Throws:
    `java.io.IOException`

### write

    public void write(byte[] b,
                      int off,
                      int len)
               throws java.io.IOException

  Description copied from interface: `FileObject`
  Write to the file.

  Specified by:
    `write` in interface `FileObject`
  Parameters:
    `b` - the byte array
    `off` - the offset
    `len` - the number of bytes
  Throws:
    `java.io.IOException`

### tryLock

    public boolean tryLock()

  Description copied from interface: `FileObject`
  Try to lock the file exclusively.

  Specified by:
    `tryLock` in interface `FileObject`
  Returns:
    true if locking was successful

### releaseLock

    public void releaseLock()

  Description copied from interface: `FileObject`
  Release the file lock.

  Specified by:
    `releaseLock` in interface `FileObject`