Out with commons-io.

git-svn-id: svn+ssh://src.earth.threerings.net/nenya/trunk@835 ed5b42cb-e716-0410-a449-f6a68f950b19
This commit is contained in:
Michael Bayne
2009-07-12 21:26:06 +00:00
parent dd77edca9c
commit 1443bd59cb
7 changed files with 16 additions and 25 deletions
-1
View File
@@ -6,7 +6,6 @@
<include name="ant.jar"/> <include name="ant.jar"/>
<include name="commons-collections.jar"/> <include name="commons-collections.jar"/>
<include name="commons-digester.jar"/> <include name="commons-digester.jar"/>
<include name="commons-io.jar"/>
<include name="commons-logging.jar"/> <include name="commons-logging.jar"/>
<include name="commons-beanutils.jar"/> <include name="commons-beanutils.jar"/>
<include name="google-collect.jar"/> <include name="google-collect.jar"/>
@@ -40,21 +40,18 @@ import javax.sound.sampled.LineUnavailableException;
import javax.sound.sampled.SourceDataLine; import javax.sound.sampled.SourceDataLine;
import javax.sound.sampled.UnsupportedAudioFileException; import javax.sound.sampled.UnsupportedAudioFileException;
import org.apache.commons.io.IOUtils;
import com.google.common.collect.Maps; 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.LRUHashMap;
import com.samskivert.util.Queue; import com.samskivert.util.Queue;
import com.samskivert.util.RandomUtil; import com.samskivert.util.RandomUtil;
import com.samskivert.util.RunQueue; import com.samskivert.util.RunQueue;
import com.samskivert.util.StringUtil; import com.samskivert.util.StringUtil;
import com.samskivert.swing.RuntimeAdjust;
import com.threerings.resource.ResourceManager;
import com.threerings.media.MediaPrefs; import com.threerings.media.MediaPrefs;
import com.threerings.resource.ResourceManager;
import static com.threerings.media.Log.log; import static com.threerings.media.Log.log;
@@ -510,7 +507,7 @@ public class JavaSoundPlayer extends SoundPlayer
InputStream stream = getTestClip(key); InputStream stream = getTestClip(key);
if (stream != null) { if (stream != null) {
data = new byte[1][]; data = new byte[1][];
data[0] = IOUtils.toByteArray(stream); data[0] = StreamUtil.toByteArray(stream);
} else { } else {
data = _loader.load(key.pkgPath, key.key); data = _loader.load(key.pkgPath, key.key);
@@ -27,8 +27,7 @@ import java.io.FileNotFoundException;
import java.io.IOException; import java.io.IOException;
import java.io.InputStream; import java.io.InputStream;
import org.apache.commons.io.IOUtils; import com.samskivert.io.StreamUtil;
import com.samskivert.util.Config; import com.samskivert.util.Config;
import com.samskivert.util.ConfigUtil; import com.samskivert.util.ConfigUtil;
import com.samskivert.util.LRUHashMap; import com.samskivert.util.LRUHashMap;
@@ -170,7 +169,7 @@ public class SoundLoader
} }
} }
return IOUtils.toByteArray(clipin); return StreamUtil.toByteArray(clipin);
} }
protected ResourceManager _rmgr; protected ResourceManager _rmgr;
@@ -31,7 +31,7 @@ import java.io.ObjectOutputStream;
import javax.imageio.ImageIO; 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.ImageProvider;
import com.threerings.media.tile.ObjectTileSet; import com.threerings.media.tile.ObjectTileSet;
@@ -137,7 +137,7 @@ public class DirectoryTileSetBundler extends TileSetBundler
outFile.getParentFile().mkdirs(); outFile.getParentFile().mkdirs();
FileOutputStream fout = new FileOutputStream(outFile); FileOutputStream fout = new FileOutputStream(outFile);
FileInputStream imgin = new FileInputStream(ifile); FileInputStream imgin = new FileInputStream(ifile);
IOUtils.copy(imgin, fout); StreamUtil.copy(imgin, fout);
} catch (Exception e) { } catch (Exception e) {
String msg = "Failure bundling image " + ifile + ": " + e; String msg = "Failure bundling image " + ifile + ": " + e;
throw (IOException) new IOException(msg).initCause(e); throw (IOException) new IOException(msg).initCause(e);
@@ -35,17 +35,14 @@ import java.io.IOException;
import java.io.ObjectOutputStream; import java.io.ObjectOutputStream;
import java.awt.image.BufferedImage; import java.awt.image.BufferedImage;
import javax.imageio.ImageIO; import javax.imageio.ImageIO;
import com.google.common.collect.Lists;
import org.apache.commons.digester.Digester;
import org.xml.sax.SAXException; 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.PersistenceException;
import com.samskivert.io.StreamUtil;
import com.samskivert.util.HashIntMap; import com.samskivert.util.HashIntMap;
import com.threerings.resource.FastImageIO; import com.threerings.resource.FastImageIO;
@@ -429,7 +426,7 @@ public class TileSetBundler
} else { } else {
jar.putNextEntry(new JarEntry(imagePath)); jar.putNextEntry(new JarEntry(imagePath));
FileInputStream imgin = new FileInputStream(ifile); FileInputStream imgin = new FileInputStream(ifile);
IOUtils.copy(imgin, jar); StreamUtil.copy(imgin, jar);
} }
} catch (Exception e) { } catch (Exception e) {
String msg = "Failure bundling image " + ifile + String msg = "Failure bundling image " + ifile +
@@ -41,7 +41,7 @@ import java.awt.image.IndexColorModel;
import java.awt.image.PixelInterleavedSampleModel; import java.awt.image.PixelInterleavedSampleModel;
import java.awt.image.WritableRaster; 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 * Provides routines for writing and reading uncompressed 8-bit color
@@ -134,7 +134,7 @@ public class FastImageIO
public static BufferedImage read (InputStream in) public static BufferedImage read (InputStream in)
throws IOException throws IOException
{ {
return read(ByteBuffer.wrap(IOUtils.toByteArray(in))); return read(ByteBuffer.wrap(StreamUtil.toByteArray(in)));
} }
/** /**
@@ -33,8 +33,7 @@ import java.io.InputStream;
import java.awt.image.BufferedImage; 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.FileUtil;
import com.samskivert.util.StringUtil; import com.samskivert.util.StringUtil;
@@ -248,7 +247,7 @@ public class FileResourceBundle extends ResourceBundle
// copy the resource into the temporary file // copy the resource into the temporary file
BufferedOutputStream fout = new BufferedOutputStream(new FileOutputStream(tfile)); BufferedOutputStream fout = new BufferedOutputStream(new FileOutputStream(tfile));
InputStream jin = _jarSource.getInputStream(entry); InputStream jin = _jarSource.getInputStream(entry);
IOUtils.copy(jin, fout); StreamUtil.copy(jin, fout);
jin.close(); jin.close();
fout.close(); fout.close();