From 1e554bd9430c3bb696da857312936944eadf99de Mon Sep 17 00:00:00 2001 From: Michael McCandless Date: Mon, 26 Sep 2011 18:25:01 +0000 Subject: [PATCH] switch packed ints impl from IndexInput/Output to DataInput/Output git-svn-id: https://svn.apache.org/repos/asf/lucene/dev/trunk@1175984 13f79535-47bb-0310-9956-ffa450edef68 --- .../org/apache/lucene/util/packed/Direct16.java | 4 ++-- .../org/apache/lucene/util/packed/Direct32.java | 4 ++-- .../org/apache/lucene/util/packed/Direct64.java | 4 ++-- .../java/org/apache/lucene/util/packed/Direct8.java | 4 ++-- .../org/apache/lucene/util/packed/Packed32.java | 8 ++++---- .../org/apache/lucene/util/packed/Packed64.java | 8 ++++---- .../org/apache/lucene/util/packed/PackedInts.java | 13 +++++++------ .../org/apache/lucene/util/packed/PackedWriter.java | 4 ++-- 8 files changed, 25 insertions(+), 24 deletions(-) diff --git a/lucene/src/java/org/apache/lucene/util/packed/Direct16.java b/lucene/src/java/org/apache/lucene/util/packed/Direct16.java index 962e224cb3c..c698bd6ab1f 100644 --- a/lucene/src/java/org/apache/lucene/util/packed/Direct16.java +++ b/lucene/src/java/org/apache/lucene/util/packed/Direct16.java @@ -17,7 +17,7 @@ package org.apache.lucene.util.packed; * limitations under the License. */ -import org.apache.lucene.store.IndexInput; +import org.apache.lucene.store.DataInput; import org.apache.lucene.util.RamUsageEstimator; import java.io.IOException; @@ -38,7 +38,7 @@ public class Direct16 extends PackedInts.ReaderImpl values = new short[valueCount]; } - public Direct16(IndexInput in, int valueCount) throws IOException { + public Direct16(DataInput in, int valueCount) throws IOException { super(valueCount, BITS_PER_VALUE); short[] values = new short[valueCount]; for(int i=0;i 0 && bitsPerValue <= 64: "bitsPerValue=" + bitsPerValue; @@ -244,7 +245,7 @@ public class PackedInts { * @throws IOException if bits could not be written to out. * @lucene.internal */ - public static Writer getWriter(IndexOutput out, int valueCount, int bitsPerValue) + public static Writer getWriter(DataOutput out, int valueCount, int bitsPerValue) throws IOException { return new PackedWriter(out, valueCount, bitsPerValue); } diff --git a/lucene/src/java/org/apache/lucene/util/packed/PackedWriter.java b/lucene/src/java/org/apache/lucene/util/packed/PackedWriter.java index b2c86dd799f..92e361561da 100644 --- a/lucene/src/java/org/apache/lucene/util/packed/PackedWriter.java +++ b/lucene/src/java/org/apache/lucene/util/packed/PackedWriter.java @@ -17,7 +17,7 @@ package org.apache.lucene.util.packed; * limitations under the License. */ -import org.apache.lucene.store.IndexOutput; +import org.apache.lucene.store.DataOutput; import java.io.IOException; @@ -38,7 +38,7 @@ class PackedWriter extends PackedInts.Writer { private final long[] masks; private int written = 0; - public PackedWriter(IndexOutput out, int valueCount, int bitsPerValue) + public PackedWriter(DataOutput out, int valueCount, int bitsPerValue) throws IOException { super(out, valueCount, bitsPerValue);