src/java.desktop/share/classes/com/sun/media/sound/RIFFReader.java
changeset 47973 d5774c36c605
parent 47216 71c04702a3d5
child 52248 2e330da7cbf4
equal deleted inserted replaced
47972:18dbd2ae7eca 47973:d5774c36c605
     1 /*
     1 /*
     2  * Copyright (c) 2007, 2016, Oracle and/or its affiliates. All rights reserved.
     2  * Copyright (c) 2007, 2017, 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
    39     private final RIFFReader root;
    39     private final RIFFReader root;
    40     private long filepointer = 0;
    40     private long filepointer = 0;
    41     private final String fourcc;
    41     private final String fourcc;
    42     private String riff_type = null;
    42     private String riff_type = null;
    43     private final long ckSize;
    43     private final long ckSize;
    44     private InputStream stream;
    44     private final InputStream stream;
    45     private long avail = 0xffffffffL; // MAX_UNSIGNED_INT
    45     private long avail = 0xffffffffL; // MAX_UNSIGNED_INT
    46     private RIFFReader lastiterator = null;
    46     private RIFFReader lastiterator = null;
    47 
    47 
    48     public RIFFReader(final InputStream stream) throws IOException {
    48     public RIFFReader(final InputStream stream) throws IOException {
    49 
    49 
   336     }
   336     }
   337 
   337 
   338     @Override
   338     @Override
   339     public void close() throws IOException {
   339     public void close() throws IOException {
   340         finish();
   340         finish();
   341         if (this == root)
   341         stream.close();
   342             stream.close();
       
   343         stream = null;
       
   344     }
   342     }
   345 }
   343 }