Does anybody could explain to me , the meaning of these code statements?
1) List<Byte> audioBytes;
List<Line2D.Double> lines;
what's Line2D.Double? What these "< ..>" stand for?
Also:
2) public void resetWaveform() {
audioBytes = new ArrayList<Byte>();
lines = new ArrayList<Line2D.Double>();
repaint();
}
and :
3) public void addAudioByte(byte b) {
audioBytes.add(b);
}
public void createWaveForm开发者_开发技巧() {
if (audioBytes.size() == 0) {
return;
}
Thanks for your help. Carlos .
Line2D.Double The < and > syntax is for Generics support. audioBytes is a List of Byte and lines is a List of Line2D.Double.
resetWaveform is resetting the data structures and addAudioByte adds the next byte of the audio stream to the collection.
Do you know how to write Java? Take a look at http://download.oracle.com/docs/cd/E17409_01/javase/tutorial/index.html first
精彩评论