src/share/classes/com/sun/media/sound/AuFileWriter.java

Print this page

        

*** 1,7 **** /* ! * Copyright (c) 1999, 2013, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it * under the terms of the GNU General Public License version 2 only, as * published by the Free Software Foundation. Oracle designates this --- 1,7 ---- /* ! * Copyright (c) 1999, 2014, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it * under the terms of the GNU General Public License version 2 only, as * published by the Free Software Foundation. Oracle designates this
*** 306,326 **** int maxLength = auFileFormat.getByteLength(); while( (bytesRead = fileStream.read( buffer )) >= 0 ) { if (maxLength>0) { if( bytesRead < maxLength ) { ! out.write( buffer, 0, (int)bytesRead ); bytesWritten += bytesRead; maxLength -= bytesRead; } else { ! out.write( buffer, 0, (int)maxLength ); bytesWritten += maxLength; maxLength = 0; break; } } else { ! out.write( buffer, 0, (int)bytesRead ); bytesWritten += bytesRead; } } return bytesWritten; --- 306,326 ---- int maxLength = auFileFormat.getByteLength(); while( (bytesRead = fileStream.read( buffer )) >= 0 ) { if (maxLength>0) { if( bytesRead < maxLength ) { ! out.write( buffer, 0, bytesRead ); bytesWritten += bytesRead; maxLength -= bytesRead; } else { ! out.write( buffer, 0, maxLength ); bytesWritten += maxLength; maxLength = 0; break; } } else { ! out.write( buffer, 0, bytesRead ); bytesWritten += bytesRead; } } return bytesWritten;