Re: [io] Addition of a TrailerInputStream class?

2014-01-31 Thread Duncan Jones
Hi Oliver,

On 29 January 2014 20:25, Oliver Heger oliver.he...@oliver-heger.de wrote:
 Hi Duncan,

 Am 28.01.2014 22:18, schrieb Duncan Jones:
 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.

 looks useful. I once have written something similar as a contribution to
 Tika for extracting ID3 tags from an MP3 file. So I think, this would
 fit into [io].

Ok, great. I'll tidy up the code and add it to an issue for further
feedback from the IO crowd.

Duncan


 Oliver


 Kind regards,

 Duncan

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


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


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



Re: [io] Addition of a TrailerInputStream class?

2014-01-29 Thread Oliver Heger
Hi Duncan,

Am 28.01.2014 22:18, schrieb Duncan Jones:
 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.

looks useful. I once have written something similar as a contribution to
Tika for extracting ID3 tags from an MP3 file. So I think, this would
fit into [io].

Oliver

 
 Kind regards,
 
 Duncan
 
 -
 To unsubscribe, e-mail: dev-unsubscr...@commons.apache.org
 For additional commands, e-mail: dev-h...@commons.apache.org
 

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



[io] Addition of a TrailerInputStream class?

2014-01-28 Thread Duncan Jones
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-unsubscr...@commons.apache.org
For additional commands, e-mail: dev-h...@commons.apache.org