Skip to content

Commit

Permalink
versionedcodecstreamwwrapper to not write/read header/footer
Browse files Browse the repository at this point in the history
  • Loading branch information
linuxpi committed Mar 28, 2023
1 parent dc9ab0d commit 55ef13d
Showing 1 changed file with 5 additions and 5 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -48,9 +48,9 @@ public VersionedCodecStreamWrapper(IndexIOStreamHandler<T> indexIOStreamHandler,
*/
public T readStream(IndexInput indexInput) throws IOException {
ChecksumIndexInput checksumIndexInput = new BufferedChecksumIndexInput(indexInput);
int readStreamVersion = checkHeader(checksumIndexInput);
T content = getHandlerForVersion(readStreamVersion).readContent(checksumIndexInput);
checkFooter(checksumIndexInput);
// int readStreamVersion = checkHeader(checksumIndexInput);
T content = getHandlerForVersion(1).readContent(indexInput);
// checkFooter(checksumIndexInput);
return content;
}

Expand All @@ -60,9 +60,9 @@ public T readStream(IndexInput indexInput) throws IOException {
* @param content stream content.
*/
public void writeStream(IndexOutput indexOutput, T content) throws IOException {
this.writeHeader(indexOutput);
// this.writeHeader(indexOutput);
getHandlerForVersion(this.currentVersion).writeContent(indexOutput, content);
this.writeFooter(indexOutput);
// this.writeFooter(indexOutput);
}

/**
Expand Down

0 comments on commit 55ef13d

Please sign in to comment.