com.jmatio.io
Class MatFileHeader

java.lang.Object
  extended by com.jmatio.io.MatFileHeader

public class MatFileHeader
extends Object

MAT-file header Level 5 MAT-files begin with a 128-byte header made up of a 124 byte text field and two, 16-bit flag fields

Author:
Wojciech Gradkowski (wgradkowski@gmail.com)

Constructor Summary
MatFileHeader(String description, int version, byte[] endianIndicator)
          New MAT-file header
 
Method Summary
static MatFileHeader createHeader()
          A factory.
 String getDescription()
          Gets descriptive text
 byte[] getEndianIndicator()
          Gets endian indicator.
 int getVersion()
          When creating a MAT-file, set version to 0x0100
 String toString()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

MatFileHeader

public MatFileHeader(String description,
                     int version,
                     byte[] endianIndicator)
New MAT-file header

Parameters:
description - - descriptive text (no longer than 116 characters)
version - - by default is set to 0x0100
endianIndicator - - byte array size of 2 indicating byte-swapping requirement
Method Detail

getDescription

public String getDescription()
Gets descriptive text

Returns:

getEndianIndicator

public byte[] getEndianIndicator()
Gets endian indicator. Bytes written as "MI" suggest that byte-swapping operation is required in order to interpret data correctly. If value is set to "IM" byte-swapping is not needed.

Returns:
- a byte array size of 2

getVersion

public int getVersion()
When creating a MAT-file, set version to 0x0100

Returns:

createHeader

public static MatFileHeader createHeader()
A factory. Creates new MatFileHeader instance with default header values:

Returns:
- new MatFileHeader instance

toString

public String toString()
Overrides:
toString in class Object


Copyright © 2006–2014 GeoSolutions. All rights reserved.