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 voidaddTypeDef(String name, Type type)DataContextcreateContext(IOHandler ioHandler)DataContextcreateContext(File file, String mode)Creates a new random access file data context.DataContextcreateContext(RandomAccessFile raf)DataContextcreateContext(FileChannel fileChannel)DataFormatgetBasisFormat()ByteOrdergetByteOrder()StringgetName()CompoundTypegetType()TypegetTypeDef(String name)StringgetVersion()booleanisTypeDef(String name)TyperemoveTypeDef(String name)voidsetBasisFormat(DataFormat basisFormat)voidsetByteOrder(ByteOrder byteOrder)voidsetName(String name)voidsetType(CompoundType type)voidsetVersion(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)
-
-