src/share/classes/com/sun/media/sound/AlawCodec.java
Print this page
@@ -1,7 +1,7 @@
/*
- * Copyright (c) 1999, 2013, Oracle and/or its affiliates. All rights reserved.
+ * 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
@@ -314,11 +314,11 @@
lowByte = 0;
}
// set the AudioInputStream length in frames if we know it
if (stream instanceof AudioInputStream) {
- frameLength = ((AudioInputStream)stream).getFrameLength();
+ frameLength = stream.getFrameLength();
}
// set framePos to zero
framePos = 0;
frameSize = inputFormat.getFrameSize();
@@ -344,11 +344,11 @@
* two-byte units.
*/
public int read() throws IOException {
byte[] b = new byte[1];
- return (int)read(b, 0, b.length);
+ return read(b, 0, b.length);
}
public int read(byte[] b) throws IOException {
@@ -430,12 +430,12 @@
int readLen = len/2;
int readOffset = off + len/2;
int readCount = super.read(b, readOffset, readLen);
for (i = off; i < (off + (readCount*2)); i+=2) {
- b[i] = (byte)tabByte1[b[readOffset] & 0xFF];
- b[i+1] = (byte)tabByte2[b[readOffset] & 0xFF];
+ b[i] = tabByte1[b[readOffset] & 0xFF];
+ b[i+1] = tabByte2[b[readOffset] & 0xFF];
readOffset++;
}
if( readCount<0 ) { // EOF or error
return readCount;