com.norconex.commons.lang.io
Class ReverseFileInputStream

java.lang.Object
  extended by java.io.InputStream
      extended by com.norconex.commons.lang.io.ReverseFileInputStream
All Implemented Interfaces:
Closeable

public class ReverseFileInputStream
extends InputStream

InputStream implementation for streaming files in reverse order (from the end of file to its beginning).

Author:
Pascal Essiembre

Constructor Summary
ReverseFileInputStream(File file)
          Creates a new ReverseFileInputStream instance.
 
Method Summary
 void close()
           
 int read()
           
 
Methods inherited from class java.io.InputStream
available, mark, markSupported, read, read, reset, skip
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ReverseFileInputStream

public ReverseFileInputStream(File file)
                       throws IOException
Creates a new ReverseFileInputStream instance.

Parameters:
file - the file to stream
Throws:
IOException - problem streaming the file
Method Detail

read

public int read()
         throws IOException
Specified by:
read in class InputStream
Throws:
IOException

close

public void close()
           throws IOException
Specified by:
close in interface Closeable
Overrides:
close in class InputStream
Throws:
IOException


Copyright © 2008-2013 Norconex Inc.. All Rights Reserved.