Package com.google.code.externalsorting
Class BinaryFileBuffer
- java.lang.Object
-
- com.google.code.externalsorting.BinaryFileBuffer
-
- All Implemented Interfaces:
IOStringStack
public final class BinaryFileBuffer extends Object implements IOStringStack
This is essentially a thin wrapper on top of a BufferedReader... which keeps the last line in memory.
-
-
Constructor Summary
Constructors Constructor Description BinaryFileBuffer(BufferedReader r)
-
-
-
Constructor Detail
-
BinaryFileBuffer
public BinaryFileBuffer(BufferedReader r) throws IOException
- Throws:
IOException
-
-
Method Detail
-
close
public void close() throws IOException
- Specified by:
close
in interfaceIOStringStack
- Throws:
IOException
-
empty
public boolean empty()
- Specified by:
empty
in interfaceIOStringStack
-
peek
public String peek()
- Specified by:
peek
in interfaceIOStringStack
-
pop
public String pop() throws IOException
- Specified by:
pop
in interfaceIOStringStack
- Throws:
IOException
-
-