Uploaded image for project: 'Lucene - Core'
  1. Lucene - Core
  2. LUCENE-2126

Split up IndexInput and IndexOutput into DataInput and DataOutput

    XMLWordPrintableJSON

Details

    • Improvement
    • Status: Closed
    • Minor
    • Resolution: Fixed
    • 4.0-ALPHA
    • 4.0-ALPHA
    • None
    • None
    • New, Patch Available

    Description

      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.

      Attachments

        1. lucene-2126.patch
          31 kB
          Michael Busch
        2. lucene-2126.patch
          30 kB
          Michael Busch

        Activity

          People

            michaelbusch Michael Busch
            michaelbusch Michael Busch
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: