[Biojava-l] BioJava-X parsing of RichSequences
Rhett Sutphin
rhett at detailedbalance.net
Wed May 3 17:44:14 UTC 2006
On May 3, 2006, at 11:50 AM, Francois Pepin wrote:
> On Wed, 2006-05-03 at 09:38 +0100, Richard Holland wrote:
>> Ah yes, I hadn't thought about that aspect. In which case, a Stream-
>> capable format-guesser is not going to be possible. But there's
>> nothing
>> stopping Ola from reading/writing to Streams directly, as long as he
>> knows what format they're in.
>
> I would tend to disagree about the impossibility of using streams.
>
> How much of the file is generally being read before the guess is made?
> I'm thinking very little is needed, especially compared to how much
> memory Java usually takes.
>
> It would not be very difficult to save that first part of the
> stream and
> then play it back once the guess is made.
I encountered the same issue when writing the chromatogram reading
code. I wrote org.biojava.utils.io.CachingInputStream as a
solution. It may be useful as a starting point.
Rhett
More information about the Biojava-l
mailing list