de.schlichtherle.io.rof
Class AbstractReadOnlyFile

java.lang.Object
  extended by de.schlichtherle.io.rof.AbstractReadOnlyFile
All Implemented Interfaces:
ReadOnlyFile
Direct Known Subclasses:
ChannelReadOnlyFile, FilterReadOnlyFile, MemoryMappedReadOnlyFile

public abstract class AbstractReadOnlyFile
extends Object
implements ReadOnlyFile

A base class for ReadOnlyFile implementations which implements the common boilerplate.

Since:
TrueZIP 6.5
Version:
TrueZIP 6.7
Author:
Christian Schlichtherle

Constructor Summary
AbstractReadOnlyFile()
           
 
Method Summary
 int read(byte[] b)
           
 void readFully(byte[] b)
           
 void readFully(byte[] buf, int off, int len)
           
 int skipBytes(int n)
          Deprecated. Use ReadOnlyFile.seek(long) instead.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface de.schlichtherle.io.rof.ReadOnlyFile
close, getFilePointer, length, read, read, seek
 

Constructor Detail

AbstractReadOnlyFile

public AbstractReadOnlyFile()
Method Detail

read

public int read(byte[] b)
         throws IOException
Specified by:
read in interface ReadOnlyFile
Throws:
IOException

readFully

public void readFully(byte[] b)
               throws IOException
Specified by:
readFully in interface ReadOnlyFile
Throws:
IOException

readFully

public void readFully(byte[] buf,
                      int off,
                      int len)
               throws IOException
Specified by:
readFully in interface ReadOnlyFile
Throws:
IOException

skipBytes

public int skipBytes(int n)
              throws IOException
Deprecated. Use ReadOnlyFile.seek(long) instead.

Specified by:
skipBytes in interface ReadOnlyFile
Throws:
IOException