[ 
https://issues.apache.org/jira/browse/DAFFODIL-1565?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Michael Beckerle updated DAFFODIL-1565:
---------------------------------------
    Comment: was deleted

(was: This provides a kind of streaming behavior that is different from XML 
SAX/StAX style parsing.  Perhaps just as valuable.

Given the DFDL schema for a message format, it allows parsing a file or input 
stream consisting of any number of repetitions of instances of that message 
format. Not as one big document, but as one document per message. 

This is also much easier to implement than the whole XML SAX/StAX style of 
behavior, as it is effectively just arranging for parse/unparse to continue 
where it left off on the input/output. 

Implementing this requires replacing/augmenting the ByteBufferDataInputStream 
class with a ByteStreamDataInputStream class. This is reimplementing the 
DataInputStream abstraction for operation on top of a java.io.InputStream 
reading from it incrementally. The biggest challenge here is implementing the 
backtracking behavior as java.io.BufferedInputStream has mark/reset, but there 
is only one level of it, were Daffodil needs a stack of them. 
)

> Parse/Unparse API Cursor-behavior/streaming enhancements
> --------------------------------------------------------
>
>                 Key: DAFFODIL-1565
>                 URL: https://issues.apache.org/jira/browse/DAFFODIL-1565
>             Project: Daffodil
>          Issue Type: Improvement
>          Components: API, Performance
>            Reporter: Steve Lawrence
>             Fix For: deferred
>
>
> See review comment for context.
> A thought. This API wants to eventually be something where we can call it 
> over and over, picking up where the prior unparse left off in the output. 
> That might be a different API that is slightly different, but in general we 
> need to be able to leave the output in a state such that the next unparse 
> call can continue where the previous left off.  Doing this at the 
> bit-position granularity might be too hard, but byte-position ought to be 
> possible. 
> That's not really about this API, which is symmetric with our parse API. It's 
> just an additional requirement. (The parse API also needs this 
> call-over-and-over capability.)



--
This message was sent by Atlassian JIRA
(v6.4.14#64029)

Reply via email to