public class ByteArrayInputStream extends InputStream
ByteArrayInputStream
替换方案。本代码移植自IBM developer works文章:
Constructor and Description |
---|
ByteArrayInputStream(byte[] data) |
ByteArrayInputStream(byte[] data,
int offset,
int length) |
Modifier and Type | Method and Description |
---|---|
int |
available() |
void |
close() |
void |
mark(int readLimit) |
boolean |
markSupported() |
int |
read() |
int |
read(byte[] data,
int offset,
int length) |
void |
reset() |
long |
skip(long amount) |
read
public ByteArrayInputStream(byte[] data)
public ByteArrayInputStream(byte[] data, int offset, int length)
public int read() throws IOException
read
in class InputStream
IOException
public int read(byte[] data, int offset, int length) throws IOException
read
in class InputStream
IOException
public long skip(long amount) throws IOException
skip
in class InputStream
IOException
public int available() throws IOException
available
in class InputStream
IOException
public void close()
close
in interface Closeable
close
in interface AutoCloseable
close
in class InputStream
public void mark(int readLimit)
mark
in class InputStream
public void reset() throws IOException
reset
in class InputStream
IOException
public boolean markSupported()
markSupported
in class InputStream
Copyright © 2006–2018 TinyGroup. All rights reserved.