src/share/classes/javax/sound/sampled/AudioFormat.java

Print this page




 371      * byte order. If the sample size is not more than one byte, the return
 372      * value is irrelevant.
 373      *
 374      * @return {@code true} if the data is stored in big-endian byte order,
 375      *         {@code false} if little-endian
 376      */
 377     public boolean isBigEndian() {
 378 
 379         return bigEndian;
 380     }
 381 
 382     /**
 383      * Obtain an unmodifiable map of properties. The concept of properties is
 384      * further explained in the {@link AudioFileFormat class description}.
 385      *
 386      * @return a {@code Map<String, Object>} object containing all properties.
 387      *         If no properties are recognized, an empty map is returned.
 388      * @see #getProperty(String)
 389      * @since 1.5
 390      */

 391     public Map<String,Object> properties() {
 392         Map<String,Object> ret;
 393         if (properties == null) {
 394             ret = new HashMap<String,Object>(0);
 395         } else {
 396             ret = (Map<String,Object>) (properties.clone());
 397         }
 398         return Collections.unmodifiableMap(ret);
 399     }
 400 
 401     /**
 402      * Obtain the property value specified by the key. The concept of properties
 403      * is further explained in the {@link AudioFileFormat class description}.
 404      * <p>
 405      * If the specified property is not defined for a particular file format,
 406      * this method returns {@code null}.
 407      *
 408      * @param  key the key of the desired property
 409      * @return the value of the property with the specified key, or {@code null}
 410      *         if the property does not exist
 411      * @see #properties()
 412      * @since 1.5
 413      */
 414     public Object getProperty(String key) {




 371      * byte order. If the sample size is not more than one byte, the return
 372      * value is irrelevant.
 373      *
 374      * @return {@code true} if the data is stored in big-endian byte order,
 375      *         {@code false} if little-endian
 376      */
 377     public boolean isBigEndian() {
 378 
 379         return bigEndian;
 380     }
 381 
 382     /**
 383      * Obtain an unmodifiable map of properties. The concept of properties is
 384      * further explained in the {@link AudioFileFormat class description}.
 385      *
 386      * @return a {@code Map<String, Object>} object containing all properties.
 387      *         If no properties are recognized, an empty map is returned.
 388      * @see #getProperty(String)
 389      * @since 1.5
 390      */
 391     @SuppressWarnings("unchecked") // Cast of result of clone.
 392     public Map<String,Object> properties() {
 393         Map<String,Object> ret;
 394         if (properties == null) {
 395             ret = new HashMap<>(0);
 396         } else {
 397             ret = (Map<String,Object>) (properties.clone());
 398         }
 399         return Collections.unmodifiableMap(ret);
 400     }
 401 
 402     /**
 403      * Obtain the property value specified by the key. The concept of properties
 404      * is further explained in the {@link AudioFileFormat class description}.
 405      * <p>
 406      * If the specified property is not defined for a particular file format,
 407      * this method returns {@code null}.
 408      *
 409      * @param  key the key of the desired property
 410      * @return the value of the property with the specified key, or {@code null}
 411      *         if the property does not exist
 412      * @see #properties()
 413      * @since 1.5
 414      */
 415     public Object getProperty(String key) {