Klasse Tap

java.lang.Object
libsidplay.components.c1530.Tap

public class Tap extends Object
TAP filetype implementation.
Autor:
Ken Händel
  • Feldübersicht

    Felder
    Modifizierer und Typ
    Feld
    Beschreibung
    (Package privat) int
    Tape counter.
    (Package privat) long
    Position in the current file.
    (Package privat) int
    Tape counter in machine-cycles/8 for even looong tapes.
    (Package privat) int
    Tape length in machine-cycles/8.
    (Package privat) RandomAccessFile
    TAP file descriptor.
    (Package privat) boolean
    Has the tap changed?
    private static final Charset
     
    (Package privat) int
    Header offset.
    private boolean
    Read only tape?
    (Package privat) long
    Size of the TAP image.
    (Package privat) byte
    System the image is made for.
    static final int
    Length of the TAP file header infos.
    static final int
    Offset of the header magic string.
    static final int
    Size of the TAP file header.
    static final int
    Offset of the TAP header system info.
    static final int
    Offset of the TAP header version info.
    (Package privat) byte
    The TAP version byte.
  • Konstruktorübersicht

    Konstruktoren
    Konstruktor
    Beschreibung
    Tap()
    Constructor.
  • Methodenübersicht

    Modifizierer und Typ
    Methode
    Beschreibung
    final void
    Close tape image.
    boolean
     
    final boolean
    open(File tapeFile)
    Open tape image.
    final boolean
    Read TAP header.
    (Package privat) final void
    Got to the start position of the tape image.
    private void
    writeFilesize(int[] buf)
    Write a filesize to the tape image, if the image contents has changed.

    Von Klasse geerbte Methoden java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
  • Felddetails

    • ISO88591

      private static final Charset ISO88591
    • TAP_HDR_SIZE

      public static final int TAP_HDR_SIZE
      Size of the TAP file header.
      Siehe auch:
    • TAP_HDR_MAGIC_OFFSET

      public static final int TAP_HDR_MAGIC_OFFSET
      Offset of the header magic string.
      Siehe auch:
    • TAP_HDR_VERSION

      public static final int TAP_HDR_VERSION
      Offset of the TAP header version info.
      Siehe auch:
    • TAP_HDR_SYSTEM

      public static final int TAP_HDR_SYSTEM
      Offset of the TAP header system info.
      Siehe auch:
    • TAP_HDR_LEN

      public static final int TAP_HDR_LEN
      Length of the TAP file header infos.
      Siehe auch:
    • fd

      TAP file descriptor.
    • size

      long size
      Size of the TAP image.
    • version

      byte version
      The TAP version byte.
    • system

      byte system
      System the image is made for.
    • currentFilePosition

      long currentFilePosition
      Position in the current file.
    • offset

      int offset
      Header offset.
    • cycleCounter

      int cycleCounter
      Tape counter in machine-cycles/8 for even looong tapes.
    • cycleCounterTotal

      int cycleCounterTotal
      Tape length in machine-cycles/8.
    • counter

      int counter
      Tape counter.
    • readOnly

      private boolean readOnly
      Read only tape?
    • hasChanged

      boolean hasChanged
      Has the tap changed? We correct the size then.
  • Konstruktordetails

    • Tap

      public Tap()
      Constructor.
  • Methodendetails

    • isReadOnly

      public boolean isReadOnly()
      Gibt zurück:
      Is this tape read only?
    • readHeader

      public final boolean readHeader()
      Read TAP header.
      Gibt zurück:
      Is the file descriptor a valid TAP file?
    • open

      public final boolean open(File tapeFile) throws IOException
      Open tape image.
      Parameter:
      tapeFile - tape file to open
      Gibt zurück:
      Is this image a TAP image file?
      Löst aus:
      IOException - tape image read error
    • close

      public final void close() throws IOException
      Close tape image.
      Löst aus:
      IOException - tape image read error
    • writeFilesize

      private void writeFilesize(int[] buf) throws IOException
      Write a filesize to the tape image, if the image contents has changed.
      Parameter:
      buf - array containing one int with the file size
      Löst aus:
      IOException - tape image write error
    • seekStart

      final void seekStart() throws IOException
      Got to the start position of the tape image.
      Löst aus:
      IOException - tape image write error