Package org.sonar.python.caching
Class VarLengthOutputStream
- java.lang.Object
-
- org.sonar.python.caching.VarLengthOutputStream
-
- All Implemented Interfaces:
Closeable,AutoCloseable
public class VarLengthOutputStream extends Object implements Closeable
Use variable length encoding for integers. https://en.wikipedia.org/wiki/Variable-length_code
-
-
Constructor Summary
Constructors Constructor Description VarLengthOutputStream(OutputStream out)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voidclose()voidwriteInt(int value)voidwriteUTF(String string)
-
-
-
Constructor Detail
-
VarLengthOutputStream
public VarLengthOutputStream(OutputStream out)
-
-
Method Detail
-
writeInt
public void writeInt(int value) throws IOException- Throws:
IOException
-
writeUTF
public void writeUTF(@Nullable String string) throws IOException- Throws:
IOException
-
close
public void close() throws IOException- Specified by:
closein interfaceAutoCloseable- Specified by:
closein interfaceCloseable- Throws:
IOException
-
-