dguitar.codecs.midi
Class MidiOutputStream

java.lang.Object
  extended bydguitar.codecs.midi.MidiOutputStream
All Implemented Interfaces:
Codec, CodecOutputStream

public class MidiOutputStream
extends java.lang.Object
implements CodecOutputStream

Author:
Chris

Field Summary
(package private)  java.io.OutputStream out
           
 
Constructor Summary
MidiOutputStream(java.io.OutputStream out)
           
 
Method Summary
 void close()
           
 boolean supportedExtension(java.lang.String extension)
          Returns if the extension is supported by this codec
 int write(java.lang.Object obj)
          Write a single single object to the stream (is this good?)
private  void writeGPSong(GPSong gpsong)
           
private  void writePerformanceFile(PerformanceFile file)
           
private  void writePerformanceLive(PerformanceLive live)
           
private  void writeSequence(javax.sound.midi.Sequence sequence)
           
private  void writeSong(Song song)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

out

java.io.OutputStream out
Constructor Detail

MidiOutputStream

public MidiOutputStream(java.io.OutputStream out)
Method Detail

close

public void close()
           throws java.io.IOException
Throws:
java.io.IOException

write

public int write(java.lang.Object obj)
          throws java.io.IOException,
                 CodecFormatException
Description copied from interface: CodecOutputStream
Write a single single object to the stream (is this good?)

Specified by:
write in interface CodecOutputStream
Throws:
CodecFormatException
java.io.IOException

writePerformanceLive

private void writePerformanceLive(PerformanceLive live)
                           throws java.io.IOException
Parameters:
live -
Throws:
java.io.IOException

writePerformanceFile

private void writePerformanceFile(PerformanceFile file)
                           throws java.io.IOException
Parameters:
file -
Throws:
java.io.IOException

writeSequence

private void writeSequence(javax.sound.midi.Sequence sequence)
                    throws java.io.IOException
Parameters:
sequence -
Throws:
java.io.IOException

writeSong

private void writeSong(Song song)
                throws java.io.IOException
Parameters:
song -
Throws:
java.io.IOException

writeGPSong

private void writeGPSong(GPSong gpsong)
                  throws MidiFormatException,
                         java.io.IOException
Parameters:
gpsong -
Throws:
MidiFormatException
java.io.IOException

supportedExtension

public boolean supportedExtension(java.lang.String extension)
Description copied from interface: Codec
Returns if the extension is supported by this codec

Specified by:
supportedExtension in interface Codec
Parameters:
extension - ".GP3" or ".TAB" or something else
Returns:
true if this codec know how to hadle that extension