mirror of
https://github.com/overcuriousity/autopsy-flatpak.git
synced 2025-07-17 02:07:42 +00:00
Merge pull request #2525 from millmanorama/2295-final-chunk-length
record the length of the final chunk as having no window
This commit is contained in:
commit
02e075ed8f
@ -167,6 +167,8 @@ class Chunker implements Iterator<Chunk>, Iterable<Chunk> {
|
|||||||
currentChunk.append(readBaseChunk());
|
currentChunk.append(readBaseChunk());
|
||||||
baseChunkSizeChars = currentChunk.length(); //save the base chunk length
|
baseChunkSizeChars = currentChunk.length(); //save the base chunk length
|
||||||
currentWindow.append(readWindow());
|
currentWindow.append(readWindow());
|
||||||
|
//add the window text to the current chunk.
|
||||||
|
currentChunk.append(currentWindow);
|
||||||
if (endOfReaderReached) {
|
if (endOfReaderReached) {
|
||||||
/* if we have reached the end of the content,we won't make
|
/* if we have reached the end of the content,we won't make
|
||||||
* another overlapping chunk, so the length of the base chunk
|
* another overlapping chunk, so the length of the base chunk
|
||||||
@ -181,8 +183,7 @@ class Chunker implements Iterator<Chunk>, Iterable<Chunk> {
|
|||||||
* and break any chunking loop in client code. */
|
* and break any chunking loop in client code. */
|
||||||
ex = ioEx;
|
ex = ioEx;
|
||||||
}
|
}
|
||||||
//add the window text to the current chunk.
|
|
||||||
currentChunk.append(currentWindow);
|
|
||||||
//sanitize the text and return a Chunk object, that includes the base chunk length.
|
//sanitize the text and return a Chunk object, that includes the base chunk length.
|
||||||
return new Chunk(currentChunk, baseChunkSizeChars, chunkSizeBytes);
|
return new Chunk(currentChunk, baseChunkSizeChars, chunkSizeBytes);
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user