public class SimpleBulkRecordReader extends Object implements BulkRecordReader
| Constructor and Description |
|---|
SimpleBulkRecordReader(BulkObjectReader reader) |
| Modifier and Type | Method and Description |
|---|---|
void |
close() |
BulkObject |
read()
Returns the next object from the file
|
<T extends BulkObject> |
tryRead(Class<T> klazz)
Reads the object only if it has a certain type
|
<T extends BulkObject> |
tryRead(Predicate<T> predicate,
Class<T> klazz)
Reads the object only if it matches a predicate
|
public SimpleBulkRecordReader(BulkObjectReader reader)
public BulkObject read()
read in interface BulkRecordReaderpublic <T extends BulkObject> TryResult<T> tryRead(Class<T> klazz)
tryRead in interface BulkRecordReaderT - Type of the objectklazz - The next object from the file if the object has the same
type as requested, null otherwisepublic <T extends BulkObject> TryResult<T> tryRead(Predicate<T> predicate, Class<T> klazz)
tryRead in interface BulkRecordReaderT - Type of the objectpredicate - Predicate that needs to be matchedklazz - The next object from the file if the object matches the
predicate, null otherwisepublic void close()
throws IOException
close in interface Closeableclose in interface AutoCloseableIOExceptionCopyright © 2024. All rights reserved.