[ 
https://issues.apache.org/jira/browse/LUCENE-2126?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12789946#action_12789946
 ] 

Michael Busch commented on LUCENE-2126:
---------------------------------------

{quote}
So first, can we perhaps name them otherwise, like LuceneInput/Output or 
something similar, to not confuse w/ Java's?
{quote}

Hmm, I was a bit concerned about confusion first too. But I'm, like Mark, not 
really liking LuceneInput/Output. I'd personally be ok with keeping 
DataInput/Output. But maybe we can come up with something better? Man, naming 
is always so hard... :)

{quote}
Second, why not have them implement Java's DataInput/Output, and add on top of 
them additional methods, like readVInt(), readVLong() etc.?
{quote}

I considered that, but Java's interfaces dictate what string encoding to use:
(From java.io.DataInput's javadocs)
{noformat}
Implementations of the DataInput and DataOutput interfaces represent Unicode 
strings in a format that is a slight modification of UTF-8.
{noformat}

E.g. DataInput defines readChar(), which we'd have to implement. But in 
IndexInput we deprecated readChars(), because we don't want to use modified 
UTF-8 anymore.

> 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: java-dev-unsubscr...@lucene.apache.org
For additional commands, e-mail: java-dev-h...@lucene.apache.org

Reply via email to