public class MatFileInputStream extends Object
Constructor and Description |
---|
MatFileInputStream(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 . |
ByteBuffer |
readToByteBuffer(ByteBuffer dest,
int elements,
ByteStorageSupport<?> storage)
Reads the data into a
. |
void |
skip(int padding) |
public MatFileInputStream(ByteBuffer buf, int type)
InputStream
is
- - input streamtype
- - type of data in the streamMatDataTypes
public int readInt() throws IOException
int
.IOException
public char readChar() throws IOException
char
.IOException
public double readDouble() throws IOException
double
.IOException
public byte readByte()
public ByteBuffer readToByteBuffer(ByteBuffer dest, int elements, ByteStorageSupport<?> storage) throws 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
IOException
- if buffer is under-fed, or another IO problem occurspublic void skip(int padding)
Copyright © 2015. All rights reserved.