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 void
close()
boolean
empty()
java.lang.String
peek()
java.lang.String
pop()
private void
reload()
-
-
-
Method Detail
-
close
public void close() throws java.io.IOException
- Specified by:
close
in interfaceIOStringStack
- Throws:
java.io.IOException
-
empty
public boolean empty()
- Specified by:
empty
in interfaceIOStringStack
-
peek
public java.lang.String peek()
- Specified by:
peek
in interfaceIOStringStack
-
pop
public java.lang.String pop() throws java.io.IOException
- Specified by:
pop
in interfaceIOStringStack
- Throws:
java.io.IOException
-
reload
private void reload() throws java.io.IOException
- Throws:
java.io.IOException
-
-