use old-style FileResource for 1.5 compatibility

This commit is contained in:
Taro L. Saito 2011-04-04 10:37:34 +09:00
parent 3807b2d138
commit 8f0260433c
2 changed files with 4 additions and 2 deletions

View File

@ -41,7 +41,8 @@ public class SnappyInputStreamTest
private static Logger _logger = Logger.getLogger(SnappyInputStreamTest.class); private static Logger _logger = Logger.getLogger(SnappyInputStreamTest.class);
public static byte[] readResourceFile(String fileName) throws IOException { public static byte[] readResourceFile(String fileName) throws IOException {
BufferedInputStream input = FileResource.openByteStream(SnappyOutputStreamTest.class, fileName); BufferedInputStream input = new BufferedInputStream(FileResource.find(SnappyOutputStreamTest.class, fileName)
.openStream());
assertNotNull(input); assertNotNull(input);
return readFully(input); return readFully(input);
} }

View File

@ -42,7 +42,8 @@ public class SnappyOutputStreamTest
ByteArrayOutputStream buf = new ByteArrayOutputStream(); ByteArrayOutputStream buf = new ByteArrayOutputStream();
SnappyOutputStream sout = new SnappyOutputStream(buf); SnappyOutputStream sout = new SnappyOutputStream(buf);
BufferedInputStream input = FileResource.openByteStream(SnappyOutputStreamTest.class, "alice29.txt"); BufferedInputStream input = new BufferedInputStream(FileResource.find(SnappyOutputStreamTest.class,
"alice29.txt").openStream());
assertNotNull(input); assertNotNull(input);
ByteArrayOutputStream orig = new ByteArrayOutputStream(); ByteArrayOutputStream orig = new ByteArrayOutputStream();