[
https://issues.apache.org/jira/browse/LUCENE-2126?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12788001#action_12788001
]
Michael Busch commented on LUCENE-2126:
---------------------------------------
The main reason why I'd like to separate DataInput/Output from
IndexInput/Output now is LUCENE-2125. Users should be able to implement methods
that serialize/deserialize attributes into/from a postinglist. These methods
should only be able to call the read/write methods (which this issue moves to
DataInput/Output), but not methods like close(), seek() etc..
Thanks for spending time reviewing this and giving feedback from Lucy land,
Marvin!
I think I will go ahead and commit this, and once we see a need to allow users
to extend DataInput/Output outside of Lucene we can go ahead and make the
additional changes that are mentioned in your in my comments here.
So I will commit this tomorrow if nobody objects.
> Split up IndexInput and IndexOutput into DataInput and DataOutput
> -----------------------------------------------------------------
>
> Key: LUCENE-2126
> URL: https://issues.apache.org/jira/browse/LUCENE-2126
> Project: Lucene - Java
> Issue Type: Improvement
> Affects Versions: Flex Branch
> Reporter: Michael Busch
> Assignee: Michael Busch
> Priority: Minor
> Fix For: Flex Branch
>
> Attachments: lucene-2126.patch
>
>
> I'd like to introduce the two new classes DataInput and DataOutput
> that contain all methods from IndexInput and IndexOutput that actually
> decode or encode data, such as readByte()/writeByte(),
> readVInt()/writeVInt().
> Methods like getFilePointer(), seek(), close(), etc., which are not
> related to data encoding, but to files as input/output source stay in
> IndexInput/IndexOutput.
> This patch also changes ByteSliceReader/ByteSliceWriter to extend
> DataInput/DataOutput. Previously ByteSliceReader implemented the
> methods that stay in IndexInput by throwing RuntimeExceptions.
> See also LUCENE-2125.
> All tests pass.
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]