jdk/src/share/classes/com/sun/media/sound/AuFileWriter.java
changeset 18215 b2afd66ce6db
parent 9035 1255eb81cc2f
child 22584 eed64ee05369
equal deleted inserted replaced
18214:e9eff0f1f1df 18215:b2afd66ce6db
     1 /*
     1 /*
     2  * Copyright (c) 1999, 2011, 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
    47 /**
    47 /**
    48  * AU file writer.
    48  * AU file writer.
    49  *
    49  *
    50  * @author Jan Borgersen
    50  * @author Jan Borgersen
    51  */
    51  */
    52 public class AuFileWriter extends SunFileWriter {
    52 public final class AuFileWriter extends SunFileWriter {
    53 
    53 
    54     //$$fb value for length field if length is not known
    54     //$$fb value for length field if length is not known
    55     public final static int UNKNOWN_SIZE=-1;
    55     public final static int UNKNOWN_SIZE=-1;
    56 
       
    57     /**
       
    58      * AU type
       
    59      */
       
    60     private static final AudioFileFormat.Type auTypes[] = {
       
    61         AudioFileFormat.Type.AU
       
    62     };
       
    63 
       
    64 
    56 
    65     /**
    57     /**
    66      * Constructs a new AuFileWriter object.
    58      * Constructs a new AuFileWriter object.
    67      */
    59      */
    68     public AuFileWriter() {
    60     public AuFileWriter() {
    69         super(auTypes);
    61         super(new AudioFileFormat.Type[]{AudioFileFormat.Type.AU});
    70     }
    62     }
    71 
       
    72 
       
    73 
    63 
    74     public AudioFileFormat.Type[] getAudioFileTypes(AudioInputStream stream) {
    64     public AudioFileFormat.Type[] getAudioFileTypes(AudioInputStream stream) {
    75 
    65 
    76         AudioFileFormat.Type[] filetypes = new AudioFileFormat.Type[types.length];
    66         AudioFileFormat.Type[] filetypes = new AudioFileFormat.Type[types.length];
    77         System.arraycopy(types, 0, filetypes, 0, types.length);
    67         System.arraycopy(types, 0, filetypes, 0, types.length);