public byte[] readToByteArray() throws IOException { // allocate memory for array elements int elements = size / sizeOf(); byte[] ab = new byte[elements]; MatFileInputStream mfis = new MatFileInputStream(buf, type); for (int i = 0; i < elements; i++) { ab[i] = mfis.readByte(); } // skip padding if (padding > 0) { buf.position(buf.position() + padding); } return ab; }
continue; case BYTE: dest.put( readByte() ); continue; case INTEGER: