org.purplejrank.jdk
public class JdkStream extends DataInputStream
| Modifier and Type | Field and Description |
|---|---|
protected List<WiredBlock> |
wiredBlocks |
in| Constructor and Description |
|---|
JdkStream(InputStream in) |
| Modifier and Type | Method and Description |
|---|---|
List<WiredBlock> |
getWiredBlocks() |
Block |
readBlock()
Read any block
|
<T extends Block> |
readBlock(Class<T> type)
Read a
Block of a specified type, throwing StreamCorruptedException
if the block isn't of that type |
String |
readLongUTF()
Read a "longstring" format UTF string
|
void |
verify()
Skip through the stream, verifying its form
|
int |
wireBlock(WiredBlock ref)
Make a backreference available for a
Block |
static void |
writeEscapedInt(OutputStream out,
int v)
Write an escaped int
|
static void |
writeEscapedLong(OutputStream out,
long v)
Write an escaped long
|
static void |
writeUTF(OutputStream out,
String s)
Write a Jrank format string
|
read, read, readBoolean, readByte, readChar, readDouble, readFloat, readFully, readFully, readInt, readLine, readLong, readShort, readUnsignedByte, readUnsignedShort, readUTF, readUTF, skipBytesavailable, close, mark, markSupported, read, reset, skipprotected List<WiredBlock> wiredBlocks
public JdkStream(InputStream in) throws IOException
IOExceptionpublic void verify()
throws IOException
IOExceptionpublic int wireBlock(WiredBlock ref)
Blockref - public List<WiredBlock> getWiredBlocks()
public <T extends Block> T readBlock(Class<T> type) throws IOException
Block of a specified type, throwing StreamCorruptedException
if the block isn't of that typetype - IOExceptionpublic Block readBlock() throws IOException
IOExceptionpublic String readLongUTF() throws IOException
IOExceptionpublic static void writeEscapedInt(OutputStream out, int v) throws IOException
out - v - IOExceptionpublic static void writeEscapedLong(OutputStream out, long v) throws IOException
out - v - IOExceptionpublic static void writeUTF(OutputStream out, String s) throws IOException
out - s - IOExceptionCopyright © 2014. All rights reserved.