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:
@@ -6,7 +6,6 @@
|
||||
<include name="ant.jar"/>
|
||||
<include name="commons-collections.jar"/>
|
||||
<include name="commons-digester.jar"/>
|
||||
<include name="commons-io.jar"/>
|
||||
<include name="commons-logging.jar"/>
|
||||
<include name="commons-beanutils.jar"/>
|
||||
<include name="google-collect.jar"/>
|
||||
|
||||
@@ -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);
|
||||
|
||||
@@ -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;
|
||||
|
||||
@@ -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);
|
||||
|
||||
@@ -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 +
|
||||
|
||||
@@ -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)));
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
@@ -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();
|
||||
|
||||
|
||||
Reference in New Issue
Block a user