本文整理了Java中org.archive.io.warc.WARCRecord.parseHeaders()
方法的一些代码示例,展示了WARCRecord.parseHeaders()
的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。WARCRecord.parseHeaders()
方法的具体详情如下:
包路径:org.archive.io.warc.WARCRecord
类名称:WARCRecord
方法名:parseHeaders
[英]Parse WARC Header Line and Named Fields.
[中]
代码示例来源:origin: iipc/webarchive-commons
/**
* Constructor.
*
* @param in Stream cue'd up to be at the start of the record this instance
* is to represent or, if <code>headers</code> is not null, just past the
* Header Line and Named Fields.
* @param identifier Identifier for this the hosting Reader.
* @param offset Current offset into <code>in</code> (Used to keep
* <code>position</code> properly aligned). Usually 0.
* @param digest True if we're to calculate digest for this record. Not
* digesting saves about ~15% of cpu during parse.
* @param strict Be strict parsing (Parsing stops if file inproperly
* formatted).
* @throws IOException
*/
public WARCRecord(final InputStream in, final String identifier,
final long offset, boolean digest, boolean strict)
throws IOException {
super(in, null, 0, digest, strict);
setHeader(parseHeaders(in, identifier, offset, strict));
}
代码示例来源:origin: org.netpreserve.commons/commons-web
/**
* Constructor.
*
* @param in Stream cue'd up to be at the start of the record this instance
* is to represent or, if <code>headers</code> is not null, just past the
* Header Line and Named Fields.
* @param identifier Identifier for this the hosting Reader.
* @param offset Current offset into <code>in</code> (Used to keep
* <code>position</code> properly aligned). Usually 0.
* @param digest True if we're to calculate digest for this record. Not
* digesting saves about ~15% of cpu during parse.
* @param strict Be strict parsing (Parsing stops if file inproperly
* formatted).
* @throws IOException
*/
public WARCRecord(final InputStream in, final String identifier,
final long offset, boolean digest, boolean strict)
throws IOException {
super(in, null, 0, digest, strict);
setHeader(parseHeaders(in, identifier, offset, strict));
}
代码示例来源:origin: org.netpreserve.commons/webarchive-commons
/**
* Constructor.
*
* @param in Stream cue'd up to be at the start of the record this instance
* is to represent or, if <code>headers</code> is not null, just past the
* Header Line and Named Fields.
* @param identifier Identifier for this the hosting Reader.
* @param offset Current offset into <code>in</code> (Used to keep
* <code>position</code> properly aligned). Usually 0.
* @param digest True if we're to calculate digest for this record. Not
* digesting saves about ~15% of cpu during parse.
* @param strict Be strict parsing (Parsing stops if file inproperly
* formatted).
* @throws IOException
*/
public WARCRecord(final InputStream in, final String identifier,
final long offset, boolean digest, boolean strict)
throws IOException {
super(in, null, 0, digest, strict);
setHeader(parseHeaders(in, identifier, offset, strict));
}
内容来源于网络,如有侵权,请联系作者删除!