public class MarcStreamReader extends Object implements MarcReader
Example usage:
InputStream input = new FileInputStream("file.mrc");
MarcReader reader = new MarcStreamReader(input);
while (reader.hasNext()) {
Record record = reader.next();
// Process record
}
Check the org.marc4j.marc package for examples about the use of
the Record object model.
When no encoding is given as an constructor argument the parser tries to resolve the encoding by looking at the character coding scheme (leader position 9) in MARC21 records. For UNIMARC records this position is not defined.
| Constructor and Description |
|---|
MarcStreamReader(InputStream input)
Constructs an instance with the specified input stream.
|
MarcStreamReader(InputStream input,
String encoding)
Constructs an instance with the specified input stream.
|
public MarcStreamReader(InputStream input)
public MarcStreamReader(InputStream input, String encoding)
public boolean hasNext()
hasNext in interface MarcReaderpublic Record next()
next in interface MarcReaderCopyright © 2014 FreeLibrary. All Rights Reserved.