20 package org.sleuthkit.autopsy.keywordsearch;
22 import java.nio.charset.Charset;
24 import org.openide.util.NbBundle;
30 class AbstractFileChunk {
32 private TextExtractor parent;
34 AbstractFileChunk(TextExtractor parent,
int chunkID) {
36 this.chunkID = chunkID;
39 public TextExtractor getParent() {
43 public int getChunkId() {
52 public String getIdString() {
56 public boolean index(Ingester ingester, byte[] content,
long contentSize, Charset indexCharset)
throws IngesterException {
57 boolean success =
true;
58 ByteContentStream bcs =
new ByteContentStream(content, contentSize, parent.getSourceFile(), indexCharset);
60 ingester.ingest(
this, bcs, content.length);
62 }
catch (Exception ingEx) {
64 throw new IngesterException(NbBundle.getMessage(
this.getClass(),
"AbstractFileChunk.index.exception.msg",
65 parent.getSourceFile().getId(), chunkID), ingEx);
static String getChunkIdString(long parentID, int childID)