Package x3
Class X3PBFileSystem
java.lang.Object
x3.X3FileSystem
x3.X3PBFileSystem
public class X3PBFileSystem extends X3FileSystem
X3 file functions using the standards used for the Decimus system which is
slightly different to the d3 standard.
- Author:
- Doug Gillespie
-
Field Summary
-
Constructor Summary
Constructors Constructor Description X3PBFileSystem()
-
Method Summary
Modifier and Type Method Description org.w3c.dom.Document
createX3HeaderXML(int blockLength, int sampleRate, int nChannels)
Create an XML document with header information.X3FileHeader
decodeFileHeader(java.lang.String xmlString)
Called just after the first few bytes of the file have been read in order to identify the file type.java.lang.String
readFileHeader(java.io.DataInputStream dis)
X3FrameHeader
readFrameHeader(java.io.DataInputStream dis, X3FileHeader x3FileHeader, X3FrameHeader exHeader)
Read a frame header from the input stream.Methods inherited from class x3.X3FileSystem
convertStringToDocument, getNodeArray, getNodeArrayList, getNodesOfName, getNodesWithAttributes, getNodesWithChildren, getX3Type, getX3Type, getXMLDataText
-
Constructor Details
-
X3PBFileSystem
public X3PBFileSystem()
-
-
Method Details
-
readFileHeader
public java.lang.String readFileHeader(java.io.DataInputStream dis) throws java.io.IOException- Specified by:
readFileHeader
in classX3FileSystem
- Throws:
java.io.IOException
-
decodeFileHeader
Description copied from class:X3FileSystem
Called just after the first few bytes of the file have been read in order to identify the file type. All files should start with a valid header, so read it now.- Specified by:
decodeFileHeader
in classX3FileSystem
- Returns:
- a valid file header structure, or null in the event of failure.
-
createX3HeaderXML
public org.w3c.dom.Document createX3HeaderXML(int blockLength, int sampleRate, int nChannels)Description copied from class:X3FileSystem
Create an XML document with header information.- Specified by:
createX3HeaderXML
in classX3FileSystem
- Parameters:
blockLength
- block length used throughout filesampleRate
- sample ratenChannels
- number o channels- Returns:
- XML document to go at front of file.
-
readFrameHeader
public X3FrameHeader readFrameHeader(java.io.DataInputStream dis, X3FileHeader x3FileHeader, X3FrameHeader exHeader) throws java.io.IOExceptionDescription copied from class:X3FileSystem
Read a frame header from the input stream.- Specified by:
readFrameHeader
in classX3FileSystem
- Parameters:
dis
- data input streamx3FileHeader
- file header so data can be extracted if format data is spread incorrectly between file and block headers .exHeader
- Existing frame header which can be reused or will be created if null.- Returns:
- a frame header structure.
- Throws:
java.io.IOException
-