public class ScaleCodecWriter
extends java.lang.Object
implements java.io.Closeable
| 限定符和类型 | 类和说明 |
|---|---|
static class |
ScaleCodecWriter.EncodingCategoryLimits |
| 限定符和类型 | 字段和说明 |
|---|---|
static CompactUIntWriter |
COMPACT_UINT |
| 构造器和说明 |
|---|
ScaleCodecWriter(java.io.OutputStream out) |
| 限定符和类型 | 方法和说明 |
|---|---|
void |
close() |
void |
directWrite(int b)
Write the byte into output stream as-is directly, the input is supposed to be already encoded
|
<T> void |
write(ScaleWriter<T> writer,
T value) |
void |
writeAsList(byte[] value) |
void |
writeBigInt256(boolean signed,
java.math.BigInteger value) |
void |
writeByte(byte value) |
void |
writeByteArray(byte[] value) |
void |
writeCompact(int value) |
void |
writeCompactInteger(java.math.BigInteger value) |
void |
writeInteger(java.math.BigInteger value,
int valueByteSize) |
void |
writeUnsignedInteger(java.math.BigInteger value,
int valueByteSize) |
public static final CompactUIntWriter COMPACT_UINT
public void writeByteArray(byte[] value)
throws java.io.IOException
java.io.IOExceptionpublic void writeAsList(byte[] value)
throws java.io.IOException
java.io.IOExceptionpublic void directWrite(int b)
throws java.io.IOException
b - byte to writejava.io.IOException - if failed to writepublic void close()
throws java.io.IOException
close 在接口中 java.io.Closeableclose 在接口中 java.lang.AutoCloseablejava.io.IOExceptionpublic <T> void write(ScaleWriter<T> writer, T value) throws java.io.IOException
java.io.IOExceptionpublic void writeByte(byte value)
throws java.io.IOException
java.io.IOExceptionpublic void writeCompactInteger(java.math.BigInteger value)
throws java.io.IOException
java.io.IOExceptionpublic void writeUnsignedInteger(java.math.BigInteger value,
int valueByteSize)
throws java.io.IOException
java.io.IOExceptionpublic void writeInteger(java.math.BigInteger value,
int valueByteSize)
throws java.io.IOException
java.io.IOExceptionpublic void writeBigInt256(boolean signed,
java.math.BigInteger value)
throws java.io.IOException
java.io.IOExceptionpublic void writeCompact(int value)
throws java.io.IOException
java.io.IOException