19 package org.sleuthkit.autopsy.keywordsearch;
21 import java.nio.charset.Charset;
23 import org.openide.util.NbBundle;
30 class AbstractFileChunk {
33 private TextExtractor parent;
35 AbstractFileChunk(TextExtractor parent,
int chunkID) {
37 this.chunkID = chunkID;
40 public TextExtractor getParent() {
44 public int getChunkId() {
53 String getIdString() {
57 void index(Ingester ingester, byte[] content,
long contentSize, Charset indexCharset)
throws IngesterException {
58 ByteContentStream bcs =
new ByteContentStream(content, contentSize, parent.getSourceFile(), indexCharset);
60 ingester.ingest(
this, bcs, content.length);
61 }
catch (Exception ingEx) {
62 throw new IngesterException(NbBundle.getMessage(
this.getClass(),
"AbstractFileChunk.index.exception.msg",
63 parent.getSourceFile().getId(), chunkID), ingEx);
static String getChunkIdString(long parentID, int childID)