Package com.bc.ceres.binio
Class DataFormat
- java.lang.Object
-
- com.bc.ceres.binio.DataFormat
-
public class DataFormat extends Object
A binary data format.
-
-
Constructor Summary
Constructors Constructor Description DataFormat()
DataFormat(CompoundType type)
DataFormat(CompoundType type, ByteOrder byteOrder)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
addTypeDef(String name, Type type)
DataContext
createContext(IOHandler ioHandler)
DataContext
createContext(File file, String mode)
Creates a new random access file data context.DataContext
createContext(RandomAccessFile raf)
DataContext
createContext(FileChannel fileChannel)
DataFormat
getBasisFormat()
ByteOrder
getByteOrder()
String
getName()
CompoundType
getType()
Type
getTypeDef(String name)
String
getVersion()
boolean
isTypeDef(String name)
Type
removeTypeDef(String name)
void
setBasisFormat(DataFormat basisFormat)
void
setByteOrder(ByteOrder byteOrder)
void
setName(String name)
void
setType(CompoundType type)
void
setVersion(String version)
-
-
-
Constructor Detail
-
DataFormat
public DataFormat()
-
DataFormat
public DataFormat(CompoundType type)
-
DataFormat
public DataFormat(CompoundType type, ByteOrder byteOrder)
-
-
Method Detail
-
createContext
public DataContext createContext(File file, String mode) throws FileNotFoundException
Creates a new random access file data context.- Parameters:
file
- the file objectmode
- the access mode, one of "r", "rw", "rws", or "rwd". See also mode description inRandomAccessFile(java.io.File, String)
.- Returns:
- The context.
- Throws:
FileNotFoundException
- If in read-only mode and the file could nt be found.
-
createContext
public DataContext createContext(RandomAccessFile raf)
-
createContext
public DataContext createContext(FileChannel fileChannel)
-
createContext
public DataContext createContext(IOHandler ioHandler)
-
getBasisFormat
public DataFormat getBasisFormat()
-
setBasisFormat
public void setBasisFormat(DataFormat basisFormat)
-
getType
public CompoundType getType()
-
setType
public void setType(CompoundType type)
-
getName
public String getName()
-
setName
public void setName(String name)
-
getVersion
public String getVersion()
-
setVersion
public void setVersion(String version)
-
getByteOrder
public ByteOrder getByteOrder()
-
setByteOrder
public void setByteOrder(ByteOrder byteOrder)
-
isTypeDef
public boolean isTypeDef(String name)
-
-