com.google.caliper.util
Class InterleavedReader
java.lang.Object
com.google.caliper.util.InterleavedReader
- All Implemented Interfaces:
- Closeable
public final class InterleavedReader
- extends Object
- implements Closeable
Reads a stream containing inline JSON objects. Each JSON object is prefixed
by a marker string and suffixed by a newline character.
Method Summary |
void |
close()
|
Object |
read()
Returns the next value in the stream: either a String, a JsonElement, or
null to indicate the end of the stream. |
DEFAULT_MARKER
public static final String DEFAULT_MARKER
- See Also:
- Constant Field Values
InterleavedReader
public InterleavedReader(Reader reader)
InterleavedReader
public InterleavedReader(String marker,
Reader reader)
read
public Object read()
throws IOException
- Returns the next value in the stream: either a String, a JsonElement, or
null to indicate the end of the stream. Callers should use instanceof to
inspect the return type.
- Throws:
IOException
close
public void close()
throws IOException
- Specified by:
close
in interface Closeable
- Throws:
IOException
Copyright © 2009-2011 Google, Inc.. All Rights Reserved.