jdk/src/share/classes/sun/audio/AudioDataStream.java
changeset 18215 b2afd66ce6db
parent 5506 202f599c92aa
equal deleted inserted replaced
18214:e9eff0f1f1df 18215:b2afd66ce6db
     1 /*
     1 /*
     2  * Copyright (c) 1999, 2002, Oracle and/or its affiliates. All rights reserved.
     2  * Copyright (c) 1999, 2013, Oracle and/or its affiliates. All rights reserved.
     3  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
     3  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
     4  *
     4  *
     5  * This code is free software; you can redistribute it and/or modify it
     5  * This code is free software; you can redistribute it and/or modify it
     6  * under the terms of the GNU General Public License version 2 only, as
     6  * under the terms of the GNU General Public License version 2 only, as
     7  * published by the Free Software Foundation.  Oracle designates this
     7  * published by the Free Software Foundation.  Oracle designates this
    24  */
    24  */
    25 
    25 
    26 package sun.audio;
    26 package sun.audio;
    27 
    27 
    28 import java.io.*;
    28 import java.io.*;
    29 import javax.sound.sampled.*;
       
    30 import javax.sound.midi.*;
       
    31 
    29 
    32 /**
    30 /**
    33  * An input stream to play AudioData.
    31  * An input stream to play AudioData.
    34  *
    32  *
    35  * @see AudioPlayer
    33  * @see AudioPlayer
    37  * @author Arthur van Hoff
    35  * @author Arthur van Hoff
    38  * @author Kara Kytle
    36  * @author Kara Kytle
    39  */
    37  */
    40 public class AudioDataStream extends ByteArrayInputStream {
    38 public class AudioDataStream extends ByteArrayInputStream {
    41 
    39 
    42     AudioData ad;
    40     private final AudioData ad;
    43 
    41 
    44     /**
    42     /**
    45      * Constructor
    43      * Constructor
    46      */
    44      */
    47     public AudioDataStream(AudioData data) {
    45     public AudioDataStream(final AudioData data) {
    48 
    46 
    49         super(data.buffer);
    47         super(data.buffer);
    50         this.ad = data;
    48         this.ad = data;
    51     }
    49     }
    52 
    50 
    53     AudioData getAudioData() {
    51     final AudioData getAudioData() {
    54         return ad;
    52         return ad;
    55     }
    53     }
    56 }
    54 }