Package com.google.code.externalsorting
Class BinaryFileBuffer
- java.lang.Object
-
- com.google.code.externalsorting.BinaryFileBuffer
-
- All Implemented Interfaces:
IOStringStack
public final class BinaryFileBuffer extends java.lang.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(java.io.BufferedReader r)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voidclose()booleanempty()java.lang.Stringpeek()java.lang.Stringpop()private voidreload()
-
-
-
Method Detail
-
close
public void close() throws java.io.IOException- Specified by:
closein interfaceIOStringStack- Throws:
java.io.IOException
-
empty
public boolean empty()
- Specified by:
emptyin interfaceIOStringStack
-
peek
public java.lang.String peek()
- Specified by:
peekin interfaceIOStringStack
-
pop
public java.lang.String pop() throws java.io.IOException- Specified by:
popin interfaceIOStringStack- Throws:
java.io.IOException
-
reload
private void reload() throws java.io.IOException- Throws:
java.io.IOException
-
-