| diff --git a/lucene/core/src/java/org/apache/lucene/store/DataOutput.java b/lucene/core/src/java/org/apache/lucene/store/DataOutput.java |
| index 9c11249..199e748 100644 |
| --- a/lucene/core/src/java/org/apache/lucene/store/DataOutput.java |
| +++ b/lucene/core/src/java/org/apache/lucene/store/DataOutput.java |
| @@ -183,7 +183,7 @@ public abstract class DataOutput { |
| * @throws IOException If there is an I/O error writing to the underlying medium. |
| * @see DataInput#readVInt() |
| */ |
| - public final void writeVInt(int i) throws IOException { |
| + public void writeVInt(int i) throws IOException { |
| while ((i & ~0x7F) != 0) { |
| writeByte((byte)((i & 0x7F) | 0x80)); |
| i >>>= 7; |
| diff --git a/lucene/core/src/java/org/apache/lucene/store/OutputStreamIndexOutput.java b/lucene/core/src/java/org/apache/lucene/store/OutputStreamIndexOutput.java |
| index c26f750..6ebbe7f 100644 |
| --- a/lucene/core/src/java/org/apache/lucene/store/OutputStreamIndexOutput.java |
| +++ b/lucene/core/src/java/org/apache/lucene/store/OutputStreamIndexOutput.java |
| @@ -54,6 +54,30 @@ public class OutputStreamIndexOutput extends IndexOutput { |
| bytesWritten += length; |
| } |
| |
| + public final void writeVInt(int i) throws IOException { |
| + while ((i & ~0x7F) != 0) { |
| + os.write((byte)((i & 0x7F) | 0x80)); |
| + i >>>= 7; |
| + bytesWritten++; |
| + } |
| + os.write((byte)i); |
| + bytesWritten++; |
| + } |
| + |
| + public final void writeShort(short i) throws IOException { |
| + os.write((byte)(i >> 8)); |
| + os.write((byte) i); |
| + bytesWritten += 2; |
| + } |
| + |
| + public void writeInt(int i) throws IOException { |
| + os.write((byte)(i >> 24)); |
| + os.write((byte)(i >> 16)); |
| + os.write((byte)(i >> 8)); |
| + os.write((byte) i); |
| + bytesWritten += 4; |
| + } |
| + |
| @Override |
| public void close() throws IOException { |
| try (final OutputStream o = os) { |