|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectde.dfki.lt.mary.unitselection.voiceimport.MaryHeader
public class MaryHeader
Common helper class to read/write a standard Mary header to/from the various Mary data files.
| Field Summary | |
|---|---|
static int |
CARTS
|
static int |
HALFPHONE_UNITFEATS
|
static int |
JOINFEATS
|
static int |
PRECOMPUTED_JOINCOSTS
|
static int |
TIMELINE
|
static int |
UNITFEATS
|
static int |
UNITS
|
static int |
UNKNOWN
|
| Constructor Summary | |
|---|---|
MaryHeader(java.io.DataInput input)
File constructor |
|
MaryHeader(int newType)
Plain constructor |
|
| Method Summary | |
|---|---|
long |
getByteSize()
|
int |
getMagic()
|
int |
getType()
|
int |
getVersion()
|
boolean |
hasBadType()
|
boolean |
hasCurrentVersion()
|
boolean |
hasLegalMagic()
|
boolean |
hasLegalType()
|
boolean |
isMaryHeader()
|
long |
load(java.io.DataInput input)
Static Mary header writer |
static int |
peekFileType(java.lang.String fileName)
For the given file, look inside and determine the file type. |
long |
writeTo(java.io.DataOutput output)
Static Mary header writer |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
public static final int UNKNOWN
public static final int CARTS
public static final int UNITS
public static final int UNITFEATS
public static final int HALFPHONE_UNITFEATS
public static final int JOINFEATS
public static final int PRECOMPUTED_JOINCOSTS
public static final int TIMELINE
| Constructor Detail |
|---|
public MaryHeader(int newType)
newType - The standard type of the Mary file, to be chosen among:
MaryHeader.CARTS, MaryHeader.UNITS, MaryHeader.UNITFEATS, MaryHeader.JOINFEATS, MaryHeader.TIMELINE.
java.lang.RuntimeException - if the input type is unknown.
public MaryHeader(java.io.DataInput input)
throws java.io.IOException
input - a DataInputStream or RandomAccessFile to read the header from.
java.io.IOException - if the input type is unknown.| Method Detail |
|---|
public static int peekFileType(java.lang.String fileName)
throws java.io.IOException
fileName -
java.io.IOException - if the file is not a MARY file.
public long writeTo(java.io.DataOutput output)
throws java.io.IOException
output - The DataOutputStream or RandomAccessFile to write to
java.io.IOException - if the file type is unknown.
public long load(java.io.DataInput input)
throws java.io.IOException
input - The data input (DataInputStream or RandomAccessFile) to read from.
java.io.IOException - (forwarded from the random access file read operations)public int getMagic()
public int getVersion()
public int getType()
public long getByteSize()
public boolean hasLegalMagic()
public boolean hasCurrentVersion()
public boolean hasBadType()
public boolean hasLegalType()
public boolean isMaryHeader()
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||