public class MaryHeader extends Object
| Modifier and Type | Field and Description |
|---|---|
static int |
CARTS |
static int |
DIRECTED_GRAPH |
static int |
HALFPHONE_UNITFEATS |
static int |
JOINFEATS |
static int |
LISTENERFEATS |
static int |
LISTENERUNITS |
static int |
PRECOMPUTED_JOINCOSTS |
static int |
SCOST |
static int |
TIMELINE |
static int |
UNITFEATS |
static int |
UNITS |
static int |
UNKNOWN |
| Constructor and Description |
|---|
MaryHeader(ByteBuffer input)
Construct a MaryHeader by reading from a file.
|
MaryHeader(DataInput input)
Construct a MaryHeader by reading from a file.
|
MaryHeader(int newType)
Consruct a MaryHeader from scratch.
|
| Modifier and Type | Method and Description |
|---|---|
int |
getMagic() |
int |
getType() |
int |
getVersion() |
boolean |
hasCurrentVersion() |
static int |
peekFileType(String fileName)
For the given file, look inside and determine the file type.
|
long |
writeTo(DataOutput output)
Mary header writer
|
public static final int UNKNOWN
public static final int CARTS
public static final int DIRECTED_GRAPH
public static final int UNITS
public static final int LISTENERUNITS
public static final int UNITFEATS
public static final int LISTENERFEATS
public static final int HALFPHONE_UNITFEATS
public static final int JOINFEATS
public static final int SCOST
public static final int PRECOMPUTED_JOINCOSTS
public static final int TIMELINE
public MaryHeader(int newType)
newType - The type of MaryHeader to create. See public final constants in this class.IllegalArgumentException - if the input type is unknown.public MaryHeader(DataInput input) throws MaryConfigurationException
input - a DataInputStream or RandomAccessFile to read the header from.MaryConfigurationException - if no mary header can be read from input.public MaryHeader(ByteBuffer input) throws MaryConfigurationException
input - a byte buffer to read the header from.MaryConfigurationException - if no mary header can be read from input.public static int peekFileType(String fileName) throws IOException
fileName - file nameIOException - if the file cannot be readpublic long writeTo(DataOutput output) throws IOException
output - The DataOutputStream or RandomAccessFile to write toIOException - if the file type is unknown.public int getMagic()
public int getVersion()
public int getType()
public boolean hasCurrentVersion()
Copyright © 2000–2016 DFKI GmbH. All rights reserved.