1 /* |
1 /* |
2 * Copyright (c) 1999, 2014, Oracle and/or its affiliates. All rights reserved. |
2 * Copyright (c) 1999, 2015, 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 |
47 /** |
47 /** |
48 * Obtains the audio file format of the input stream provided. The stream |
48 * Obtains the audio file format of the input stream provided. The stream |
49 * must point to valid audio file data. In general, audio file readers may |
49 * must point to valid audio file data. In general, audio file readers may |
50 * need to read some data from the stream before determining whether they |
50 * need to read some data from the stream before determining whether they |
51 * support it. These parsers must be able to mark the stream, read enough |
51 * support it. These parsers must be able to mark the stream, read enough |
52 * data to determine whether they support the stream, and, if not, reset the |
52 * data to determine whether they support the stream, and reset the stream's |
53 * stream's read pointer to its original position. If the input stream does |
53 * read pointer to its original position. If the input stream does not |
54 * not support this, this method may fail with an {@code IOException}. |
54 * support this, this method may fail with an {@code IOException}. |
55 * |
55 * |
56 * @param stream the input stream from which file format information should |
56 * @param stream the input stream from which file format information should |
57 * be extracted |
57 * be extracted |
58 * @return an {@code AudioFileFormat} object describing the audio file |
58 * @return an {@code AudioFileFormat} object describing the audio file |
59 * format |
59 * format |
99 /** |
99 /** |
100 * Obtains an audio input stream from the input stream provided. The stream |
100 * Obtains an audio input stream from the input stream provided. The stream |
101 * must point to valid audio file data. In general, audio file readers may |
101 * must point to valid audio file data. In general, audio file readers may |
102 * need to read some data from the stream before determining whether they |
102 * need to read some data from the stream before determining whether they |
103 * support it. These parsers must be able to mark the stream, read enough |
103 * support it. These parsers must be able to mark the stream, read enough |
104 * data to determine whether they support the stream, and, if not, reset the |
104 * data to determine whether they support the stream, and reset the stream's |
105 * stream's read pointer to its original position. If the input stream does |
105 * read pointer to its original position. If the input stream does not |
106 * not support this, this method may fail with an {@code IOException}. |
106 * support this, this method may fail with an {@code IOException}. |
107 * |
107 * |
108 * @param stream the input stream from which the {@code AudioInputStream} |
108 * @param stream the input stream from which the {@code AudioInputStream} |
109 * should be constructed |
109 * should be constructed |
110 * @return an {@code AudioInputStream} object based on the audio file data |
110 * @return an {@code AudioInputStream} object based on the audio file data |
111 * contained in the input stream |
111 * contained in the input stream |