tapeutils.zx81
Class TZXZX81Block

java.lang.Object
  extended bytapeutils.zx81.TZXZX81Block

public class TZXZX81Block
extends java.lang.Object

This class represents ZX81 data from a TZX file's generic block.

Author:
hldswrth

Constructor Summary
TZXZX81Block(java.io.InputStream is)
          Construct from an input stream.
TZXZX81Block(ZX81SampleAnalyzer analyzer, int pause)
          Construct from a program name and bytes.
 
Method Summary
 byte[] getBytes()
           
 byte[] getOneSymbolTable()
           
 int getPause()
           
 byte[] getProgramNameBytes()
           
 byte[] getZeroSymbolTable()
           
 boolean read(java.io.InputStream is)
          Read the ZX81 data from the given output stream.
static java.util.List readTZXZX81Blocks(java.io.File file)
          Read in the ZX81 blocks from the file.
static java.util.List readTZXZX81Blocks(java.io.InputStream is)
          Read in the ZX81 blocks from the stream.
 void write(java.io.OutputStream os)
          Write the ZX81 data to the given output stream.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

TZXZX81Block

public TZXZX81Block(ZX81SampleAnalyzer analyzer,
                    int pause)
Construct from a program name and bytes.

Parameters:
analyzer -
pause -

TZXZX81Block

public TZXZX81Block(java.io.InputStream is)
             throws java.io.IOException
Construct from an input stream.

Parameters:
is -
Throws:
java.io.IOException
Method Detail

readTZXZX81Blocks

public static java.util.List readTZXZX81Blocks(java.io.File file)
                                        throws java.io.IOException
Read in the ZX81 blocks from the file.

Parameters:
file -
Returns:
The list of ZX81 block.
Throws:
java.io.IOException

readTZXZX81Blocks

public static java.util.List readTZXZX81Blocks(java.io.InputStream is)
                                        throws java.io.IOException
Read in the ZX81 blocks from the stream.

Parameters:
is -
Returns:
The list of ZX81 block.
Throws:
java.io.IOException

getBytes

public byte[] getBytes()
Returns:
The program bytes.

getProgramNameBytes

public byte[] getProgramNameBytes()
Returns:
The program name bytes.

getPause

public int getPause()
Returns:
The pause.

getZeroSymbolTable

public byte[] getZeroSymbolTable()
Returns:
The symbol table.

getOneSymbolTable

public byte[] getOneSymbolTable()
Returns:
The symbol table.

write

public void write(java.io.OutputStream os)
           throws java.io.IOException
Write the ZX81 data to the given output stream.

Parameters:
os - The output stream.
Throws:
java.io.IOException

read

public boolean read(java.io.InputStream is)
             throws java.io.IOException
Read the ZX81 data from the given output stream.

Parameters:
is - The output stream.
Returns:
Indicates whether the data in the stream was a ZX81 data block.
Throws:
java.io.IOException