diff --git a/etc/libs-incl.xml b/etc/libs-incl.xml index f96deafd..4a11b290 100644 --- a/etc/libs-incl.xml +++ b/etc/libs-incl.xml @@ -6,7 +6,6 @@ - diff --git a/src/java/com/threerings/media/sound/JavaSoundPlayer.java b/src/java/com/threerings/media/sound/JavaSoundPlayer.java index a4982f79..b2ce541c 100644 --- a/src/java/com/threerings/media/sound/JavaSoundPlayer.java +++ b/src/java/com/threerings/media/sound/JavaSoundPlayer.java @@ -40,21 +40,18 @@ import javax.sound.sampled.LineUnavailableException; import javax.sound.sampled.SourceDataLine; import javax.sound.sampled.UnsupportedAudioFileException; -import org.apache.commons.io.IOUtils; - import com.google.common.collect.Maps; +import com.samskivert.io.StreamUtil; +import com.samskivert.swing.RuntimeAdjust; import com.samskivert.util.LRUHashMap; import com.samskivert.util.Queue; import com.samskivert.util.RandomUtil; import com.samskivert.util.RunQueue; import com.samskivert.util.StringUtil; -import com.samskivert.swing.RuntimeAdjust; - -import com.threerings.resource.ResourceManager; - import com.threerings.media.MediaPrefs; +import com.threerings.resource.ResourceManager; import static com.threerings.media.Log.log; @@ -510,7 +507,7 @@ public class JavaSoundPlayer extends SoundPlayer InputStream stream = getTestClip(key); if (stream != null) { data = new byte[1][]; - data[0] = IOUtils.toByteArray(stream); + data[0] = StreamUtil.toByteArray(stream); } else { data = _loader.load(key.pkgPath, key.key); diff --git a/src/java/com/threerings/media/sound/SoundLoader.java b/src/java/com/threerings/media/sound/SoundLoader.java index 00daa9da..6e9b38a3 100644 --- a/src/java/com/threerings/media/sound/SoundLoader.java +++ b/src/java/com/threerings/media/sound/SoundLoader.java @@ -27,8 +27,7 @@ import java.io.FileNotFoundException; import java.io.IOException; import java.io.InputStream; -import org.apache.commons.io.IOUtils; - +import com.samskivert.io.StreamUtil; import com.samskivert.util.Config; import com.samskivert.util.ConfigUtil; import com.samskivert.util.LRUHashMap; @@ -170,7 +169,7 @@ public class SoundLoader } } - return IOUtils.toByteArray(clipin); + return StreamUtil.toByteArray(clipin); } protected ResourceManager _rmgr; diff --git a/src/java/com/threerings/media/tile/bundle/tools/DirectoryTileSetBundler.java b/src/java/com/threerings/media/tile/bundle/tools/DirectoryTileSetBundler.java index 8be78563..4b587513 100644 --- a/src/java/com/threerings/media/tile/bundle/tools/DirectoryTileSetBundler.java +++ b/src/java/com/threerings/media/tile/bundle/tools/DirectoryTileSetBundler.java @@ -31,7 +31,7 @@ import java.io.ObjectOutputStream; import javax.imageio.ImageIO; -import org.apache.commons.io.IOUtils; +import com.samskivert.io.StreamUtil; import com.threerings.media.tile.ImageProvider; import com.threerings.media.tile.ObjectTileSet; @@ -137,7 +137,7 @@ public class DirectoryTileSetBundler extends TileSetBundler outFile.getParentFile().mkdirs(); FileOutputStream fout = new FileOutputStream(outFile); FileInputStream imgin = new FileInputStream(ifile); - IOUtils.copy(imgin, fout); + StreamUtil.copy(imgin, fout); } catch (Exception e) { String msg = "Failure bundling image " + ifile + ": " + e; throw (IOException) new IOException(msg).initCause(e); diff --git a/src/java/com/threerings/media/tile/bundle/tools/TileSetBundler.java b/src/java/com/threerings/media/tile/bundle/tools/TileSetBundler.java index f7593cb2..90836d8c 100644 --- a/src/java/com/threerings/media/tile/bundle/tools/TileSetBundler.java +++ b/src/java/com/threerings/media/tile/bundle/tools/TileSetBundler.java @@ -35,17 +35,14 @@ import java.io.IOException; import java.io.ObjectOutputStream; import java.awt.image.BufferedImage; - import javax.imageio.ImageIO; +import com.google.common.collect.Lists; +import org.apache.commons.digester.Digester; import org.xml.sax.SAXException; -import org.apache.commons.digester.Digester; -import org.apache.commons.io.IOUtils; - -import com.google.common.collect.Lists; - import com.samskivert.io.PersistenceException; +import com.samskivert.io.StreamUtil; import com.samskivert.util.HashIntMap; import com.threerings.resource.FastImageIO; @@ -429,7 +426,7 @@ public class TileSetBundler } else { jar.putNextEntry(new JarEntry(imagePath)); FileInputStream imgin = new FileInputStream(ifile); - IOUtils.copy(imgin, jar); + StreamUtil.copy(imgin, jar); } } catch (Exception e) { String msg = "Failure bundling image " + ifile + diff --git a/src/java/com/threerings/resource/FastImageIO.java b/src/java/com/threerings/resource/FastImageIO.java index 18c7adff..7ac2cede 100644 --- a/src/java/com/threerings/resource/FastImageIO.java +++ b/src/java/com/threerings/resource/FastImageIO.java @@ -41,7 +41,7 @@ import java.awt.image.IndexColorModel; import java.awt.image.PixelInterleavedSampleModel; import java.awt.image.WritableRaster; -import org.apache.commons.io.IOUtils; +import com.samskivert.io.StreamUtil; /** * Provides routines for writing and reading uncompressed 8-bit color @@ -134,7 +134,7 @@ public class FastImageIO public static BufferedImage read (InputStream in) throws IOException { - return read(ByteBuffer.wrap(IOUtils.toByteArray(in))); + return read(ByteBuffer.wrap(StreamUtil.toByteArray(in))); } /** diff --git a/src/java/com/threerings/resource/FileResourceBundle.java b/src/java/com/threerings/resource/FileResourceBundle.java index 774597c2..6aa99506 100644 --- a/src/java/com/threerings/resource/FileResourceBundle.java +++ b/src/java/com/threerings/resource/FileResourceBundle.java @@ -33,8 +33,7 @@ import java.io.InputStream; import java.awt.image.BufferedImage; -import org.apache.commons.io.IOUtils; - +import com.samskivert.io.StreamUtil; import com.samskivert.util.FileUtil; import com.samskivert.util.StringUtil; @@ -248,7 +247,7 @@ public class FileResourceBundle extends ResourceBundle // copy the resource into the temporary file BufferedOutputStream fout = new BufferedOutputStream(new FileOutputStream(tfile)); InputStream jin = _jarSource.getInputStream(entry); - IOUtils.copy(jin, fout); + StreamUtil.copy(jin, fout); jin.close(); fout.close();