org.archive.io.warc.WARCRecord.parseHeaders()方法的使用及代码示例

x33g5p2x  于2022-02-03 转载在 其他  
字(2.7k)|赞(0)|评价(0)|浏览(100)

本文整理了Java中org.archive.io.warc.WARCRecord.parseHeaders()方法的一些代码示例,展示了WARCRecord.parseHeaders()的具体用法。这些代码示例主要来源于Github/Stackoverflow/Maven等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。WARCRecord.parseHeaders()方法的具体详情如下:
包路径:org.archive.io.warc.WARCRecord
类名称:WARCRecord
方法名:parseHeaders

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));
}

相关文章