public class WarcParser extends MessageParser
Unless you're doing something advanced (like non-blocking IO) you should use the higher-level WarcReader
class instead.
| Constructor and Description |
|---|
WarcParser() |
| Modifier and Type | Method and Description |
|---|---|
MessageHeaders |
headers() |
boolean |
isError() |
boolean |
isFinished() |
static WarcParser |
newWarcFieldsParser() |
void |
parse(ByteBuffer data) |
boolean |
parse(ReadableByteChannel channel,
ByteBuffer buffer) |
long |
position() |
void |
reset() |
void |
setLenient(boolean lenient)
Sets the lenient mode for the WarcParser.
|
MessageVersion |
version() |
emitWarning, getErrorContext, getErrorContextpublic static WarcParser newWarcFieldsParser()
public void reset()
public void setLenient(boolean lenient)
When enabled, this causes the parser to follow the specification less strictly, allowing reading of non-compliant records by:
public boolean isFinished()
public boolean isError()
public void parse(ByteBuffer data)
public boolean parse(ReadableByteChannel channel, ByteBuffer buffer) throws IOException
IOExceptionpublic MessageHeaders headers()
public MessageVersion version()
public long position()
Copyright © 2024. All rights reserved.