public final class PtpInputStream
extends java.io.InputStream
Constructor and Description |
---|
PtpInputStream(byte[] bytes) |
PtpInputStream(java.io.InputStream is)
Wrap InputStream by PtpInputStream.
|
Modifier and Type | Method and Description |
---|---|
int |
available() |
void |
close() |
void |
mark(int readlimit) |
boolean |
markSupported() |
int |
read() |
int |
read(byte[] b) |
int |
read(byte[] b,
int off,
int len) |
java.lang.Object |
readAs(DataType dataType)
Read data as DataType of specified code.
|
java.util.List<UINT16> |
readAUINT16()
Read list of UINT16 from the stream.
|
java.util.List<UINT32> |
readAUINT32()
Read list of UINT32 from the stream.
|
short |
readINT16() |
java.lang.String |
readString()
Read list of String from the stream as PTP String.
|
UINT16 |
readUINT16()
Read UINT16 value from the stream.
|
UINT32 |
readUINT32()
Read UINT32 value from the stream.
|
UINT64 |
readUINT64()
Read UINT64 value from the stream.
|
void |
reset() |
long |
skip(long n) |
public PtpInputStream(byte[] bytes)
public PtpInputStream(java.io.InputStream is)
is
- public short readINT16() throws java.io.IOException
java.io.IOException
public UINT16 readUINT16() throws java.io.IOException
java.io.IOException
public UINT32 readUINT32() throws java.io.IOException
java.io.IOException
public UINT64 readUINT64() throws java.io.IOException
java.io.IOException
public java.util.List<UINT16> readAUINT16() throws java.io.IOException
java.io.IOException
public java.util.List<UINT32> readAUINT32() throws java.io.IOException
java.io.IOException
public java.lang.String readString() throws java.io.IOException
java.io.IOException
public java.lang.Object readAs(DataType dataType) throws java.io.IOException
dataType
- java.io.IOException
public int read() throws java.io.IOException
read
in class java.io.InputStream
java.io.IOException
public int read(byte[] b) throws java.io.IOException
read
in class java.io.InputStream
java.io.IOException
public int read(byte[] b, int off, int len) throws java.io.IOException
read
in class java.io.InputStream
java.io.IOException
public long skip(long n) throws java.io.IOException
skip
in class java.io.InputStream
java.io.IOException
public int available() throws java.io.IOException
available
in class java.io.InputStream
java.io.IOException
public void close() throws java.io.IOException
close
in interface java.io.Closeable
close
in interface java.lang.AutoCloseable
close
in class java.io.InputStream
java.io.IOException
public void mark(int readlimit)
mark
in class java.io.InputStream
public void reset() throws java.io.IOException
reset
in class java.io.InputStream
java.io.IOException
public boolean markSupported()
markSupported
in class java.io.InputStream