public class MatFileInputStream
extends java.lang.Object
Constructor and Description |
---|
MatFileInputStream(java.nio.ByteBuffer buf,
int type)
Attach MAT-file input stream to
InputStream |
Modifier and Type | Method and Description |
---|---|
byte |
readByte() |
char |
readChar()
Reads data (number of bytes red is determined by data type)
from the stream to
char . |
double |
readDouble()
Reads data (number of bytes red is determined by data type)
from the stream to
double . |
int |
readInt()
Reads data (number of bytes red is determined by data type)
from the stream to
int . |
java.nio.ByteBuffer |
readToByteBuffer(java.nio.ByteBuffer dest,
int elements,
ByteStorageSupport<?> storage)
Reads the data into a
. |
void |
skip(int padding) |
public MatFileInputStream(java.nio.ByteBuffer buf, int type)
InputStream
is
- - input streamtype
- - type of data in the streamMatDataTypes
public int readInt() throws java.io.IOException
int
.java.io.IOException
public char readChar() throws java.io.IOException
char
.java.io.IOException
public double readDouble() throws java.io.IOException
double
.java.io.IOException
public byte readByte()
public java.nio.ByteBuffer readToByteBuffer(java.nio.ByteBuffer dest, int elements, ByteStorageSupport<?> storage) throws java.io.IOException
ByteBuffer
. This method is
only supported for arrays with backing ByteBuffer (ByteStorageSupport
).dest
- the destination ByteBuffer
elements
- the number of elements to read into a bufferstorage
- the backing ByteStorageSupport
that
gives information how data should be interpretedByteBuffer
java.io.IOException
- if buffer is under-fed, or another IO problem occurspublic void skip(int padding)