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