diff options
author | Sven Gothel <[email protected]> | 2014-07-03 16:27:25 +0200 |
---|---|---|
committer | Sven Gothel <[email protected]> | 2014-07-03 16:27:25 +0200 |
commit | 0430708fbcbdc5572affb45318eb782adffd13f1 (patch) | |
tree | 61ac401ea90e07ae0a7ac639da1e6a240f1b87cd /src/java/com/jogamp/openal/util/WAVLoader.java | |
parent | 21cd5206625aaa8914e53bdfaab8e7ae4e497a08 (diff) |
Code Clean-Up based on our Recommended Settings (jogamp-scripting c47bc86ae2ee268a1f38c5580d11f93d7f8d6e74)
- Change non static accesses to static members using declaring type
- Change indirect accesses to static members to direct accesses (accesses through subtypes)
- Add final modifier to private fields
- Add final modifier to method parameters
- Add final modifier to local variables
- Remove unnecessary casts
- Remove unnecessary '$NON-NLS$' tags
- Remove trailing white spaces on all lines
Diffstat (limited to 'src/java/com/jogamp/openal/util/WAVLoader.java')
-rw-r--r-- | src/java/com/jogamp/openal/util/WAVLoader.java | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/src/java/com/jogamp/openal/util/WAVLoader.java b/src/java/com/jogamp/openal/util/WAVLoader.java index 5547ed2..bb3507e 100644 --- a/src/java/com/jogamp/openal/util/WAVLoader.java +++ b/src/java/com/jogamp/openal/util/WAVLoader.java @@ -61,9 +61,9 @@ public class WAVLoader { * @throws IOException If the file can no be found or some other IO error * occurs */ - public static WAVData loadFromFile(String filename) throws ALException, IOException { - File soundFile = new File(filename); - InputStream is = new FileInputStream(soundFile); + public static WAVData loadFromFile(final String filename) throws ALException, IOException { + final File soundFile = new File(filename); + final InputStream is = new FileInputStream(soundFile); return loadFromStreamImpl(is); } @@ -78,7 +78,7 @@ public class WAVLoader { * @throws IOException If the file can no be found or some other IO error * occurs */ - public static WAVData loadFromStream(InputStream stream) throws ALException, IOException { + public static WAVData loadFromStream(final InputStream stream) throws ALException, IOException { return loadFromStreamImpl(stream); } @@ -89,7 +89,7 @@ public class WAVLoader { private static final int FMT = 0x666D7420; private static final int DATA = 0x64617461; - private static WAVData loadFromStreamImpl(InputStream aIn) throws ALException, IOException { + private static WAVData loadFromStreamImpl(final InputStream aIn) throws ALException, IOException { /** * references: * http://www.sonicspot.com/guide/wavefiles.html @@ -125,7 +125,7 @@ public class WAVLoader { long chunkLength = 0; while (!foundData) { - int chunkId = (int)bs.readUInt32(true /* msbFirst */, true /* bigEndian */); + final int chunkId = (int)bs.readUInt32(true /* msbFirst */, true /* bigEndian */); chunkLength = bs.readUInt32(true /* msbFirst */, bigEndian); switch (chunkId) { case FMT: |