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)
InputStreamis - - input streamtype - - type of data in the streamMatDataTypespublic int readInt()
throws java.io.IOException
int.java.io.IOExceptionpublic char readChar()
throws java.io.IOException
char.java.io.IOExceptionpublic double readDouble()
throws java.io.IOException
double.java.io.IOExceptionpublic 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 ByteBufferelements - the number of elements to read into a bufferstorage - the backing ByteStorageSupport that
gives information how data should be interpretedByteBufferjava.io.IOException - if buffer is under-fed, or another IO problem occurspublic void skip(int padding)