开发者

Code about waveform creation ...help--

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

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜