org.herac.tuxguitar.io.pt

Class PTBInputStream

Known Direct Subclasses:
PTB4InputStream

public abstract class PTBInputStream
extends java.lang.Object

Nested Class Summary

protected class
PTBInputStream.BarHelper
protected class
PTBInputStream.BeatHelper
protected class
PTBInputStream.GuitarInHelper
protected class
PTBInputStream.NoteHelper
protected class
PTBInputStream.SongInfo
protected class
PTBInputStream.TempoHelper
protected class
PTBInputStream.TrackHelper
protected class
PTBInputStream.TrackInfo

Field Summary

protected static int
TRACK_TYPE_BASS
protected static int
TRACK_TYPE_GUITAR
protected List
headers
protected int
lastUsedChannel
protected List
trackInfos
protected List
tracks
protected String
version

Constructor Summary

PTBInputStream(FileInputStream file)
PTBInputStream(String fileName)

Method Summary

protected Song
checkSong(Song song)
protected void
debug(String s)
protected void
debug(int i)
protected MeasureHeader
getHeader(long start)
protected MeasureHeader
getLastHeader()
protected Measure
getMeasure(SongTrack track, long start)
protected SongTrack
getTrack(int number, int trackType)
abstract boolean
isSupportedVersion()
abstract boolean
isSupportedVersion(String version)
protected long
makeSectionNotes(long start, List trackHelpers, List barHelpers, List tempoHelpers)
protected void
makeTrackChannels(int fromNumber, int trackType, List guitarInHelpers)
protected int
readByte()
protected String
readString()
protected String
readString(int length)
protected int
readUCType()
protected boolean
readUChar()
protected int
readUInt()
protected int
readULong()

Field Details

TRACK_TYPE_BASS

protected static final int TRACK_TYPE_BASS
Field Value:
2

TRACK_TYPE_GUITAR

protected static final int TRACK_TYPE_GUITAR
Field Value:
1

headers

protected List headers

lastUsedChannel

protected int lastUsedChannel

trackInfos

protected List trackInfos

tracks

protected List tracks

version

protected String version

Constructor Details

PTBInputStream

public PTBInputStream(FileInputStream file)
            throws FileNotFoundException

PTBInputStream

public PTBInputStream(String fileName)
            throws FileNotFoundException

Method Details

checkSong

protected Song checkSong(Song song)
            throws IOException

debug

protected void debug(String s)

debug

protected void debug(int i)

getHeader

protected MeasureHeader getHeader(long start)

getLastHeader

protected MeasureHeader getLastHeader()

getMeasure

protected Measure getMeasure(SongTrack track,
                             long start)

getTrack

protected SongTrack getTrack(int number,
                             int trackType)

isSupportedVersion

public abstract boolean isSupportedVersion()

isSupportedVersion

public abstract boolean isSupportedVersion(String version)

makeSectionNotes

protected long makeSectionNotes(long start,
                                List trackHelpers,
                                List barHelpers,
                                List tempoHelpers)

makeTrackChannels

protected void makeTrackChannels(int fromNumber,
                                 int trackType,
                                 List guitarInHelpers)

readByte

protected int readByte()

readString

protected String readString()

readString

protected String readString(int length)

readUCType

protected int readUCType()

readUChar

protected boolean readUChar()

readUInt

protected int readUInt()

readULong

protected int readULong()