commons-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Duncan Jones <djo...@apache.org>
Subject [io] Addition of a TrailerInputStream class?
Date Tue, 28 Jan 2014 21:18:10 GMT
Hi all,

For a project of mine I developed a class named TrailerInputStream,
which reads from an InputStream whilst retaining a buffer of N bytes
(the trailer), Once the stream has been exhausted, the final N bytes
are obtained by calling the getTrailer() method.

I found it helpful for reading structured data in which the main
contents of the stream are processed differently to the trailer at the
end.

Is there a place for something like this in IO? I can imagine a
symmetric class called HeaderInputStream as well.

Current code is at
https://github.com/RNCryptor/JNCryptor/blob/streaming/src/main/java/org/cryptonode/jncryptor/TrailerInputStream.java.
It's not yet in a fit state for submission, but isn't far away in
terms of comment quality and unit tests.

Kind regards,

Duncan

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@commons.apache.org
For additional commands, e-mail: dev-help@commons.apache.org


Mime
View raw message