227 * Obtains the length of the audio data contained in the file, expressed in sample frames.
228 * @return the number of sample frames of audio data in the file
229 * @see AudioSystem#NOT_SPECIFIED
230 */
231 public int getFrameLength() {
232 return frameLength;
233 }
234
235 /**
236 * Obtain an unmodifiable map of properties.
237 * The concept of properties is further explained in
238 * the {@link AudioFileFormat class description}.
239 *
240 * @return a <code>Map<String,Object></code> object containing
241 * all properties. If no properties are recognized, an empty map is
242 * returned.
243 *
244 * @see #getProperty(String)
245 * @since 1.5
246 */
247 public Map<String,Object> properties() {
248 Map<String,Object> ret;
249 if (properties == null) {
250 ret = new HashMap<String,Object>(0);
251 } else {
252 ret = (Map<String,Object>) (properties.clone());
253 }
254 return Collections.unmodifiableMap(ret);
255 }
256
257
258 /**
259 * Obtain the property value specified by the key.
260 * The concept of properties is further explained in
261 * the {@link AudioFileFormat class description}.
262 *
263 * <p>If the specified property is not defined for a
264 * particular file format, this method returns
265 * <code>null</code>.
266 *
267 * @param key the key of the desired property
268 * @return the value of the property with the specified key,
269 * or <code>null</code> if the property does not exist.
270 *
|
227 * Obtains the length of the audio data contained in the file, expressed in sample frames.
228 * @return the number of sample frames of audio data in the file
229 * @see AudioSystem#NOT_SPECIFIED
230 */
231 public int getFrameLength() {
232 return frameLength;
233 }
234
235 /**
236 * Obtain an unmodifiable map of properties.
237 * The concept of properties is further explained in
238 * the {@link AudioFileFormat class description}.
239 *
240 * @return a <code>Map<String,Object></code> object containing
241 * all properties. If no properties are recognized, an empty map is
242 * returned.
243 *
244 * @see #getProperty(String)
245 * @since 1.5
246 */
247 @SuppressWarnings("unchecked") // Cast of result of clone
248 public Map<String,Object> properties() {
249 Map<String,Object> ret;
250 if (properties == null) {
251 ret = new HashMap<>(0);
252 } else {
253 ret = (Map<String,Object>) (properties.clone());
254 }
255 return Collections.unmodifiableMap(ret);
256 }
257
258
259 /**
260 * Obtain the property value specified by the key.
261 * The concept of properties is further explained in
262 * the {@link AudioFileFormat class description}.
263 *
264 * <p>If the specified property is not defined for a
265 * particular file format, this method returns
266 * <code>null</code>.
267 *
268 * @param key the key of the desired property
269 * @return the value of the property with the specified key,
270 * or <code>null</code> if the property does not exist.
271 *
|