K
- The key type.V
- The value type.public static class SortedKeyValueFile.Writer<K,V> extends Object implements Closeable
Modifier and Type | Class and Description |
---|---|
static class |
SortedKeyValueFile.Writer.Options
A class to encapsulate the various options of a SortedKeyValueFile.Writer.
|
Constructor and Description |
---|
Writer(SortedKeyValueFile.Writer.Options options)
Creates a writer for a new file.
|
Modifier and Type | Method and Description |
---|---|
void |
append(K key,
V value)
Appends a record to the SortedKeyValueFile.
|
void |
close() |
public Writer(SortedKeyValueFile.Writer.Options options) throws IOException
options
- The options.IOException
- If there is an error.public void append(K key, V value) throws IOException
key
- The key.value
- The value.IOException
- If there is an error.public void close() throws IOException
close
in interface Closeable
close
in interface AutoCloseable
IOException
Copyright © 2009–2021 The Apache Software Foundation. All rights reserved.