From 8f0260433cbb3cf3135d36522f4c0ce4d3309bcc Mon Sep 17 00:00:00 2001 From: "Taro L. Saito" Date: Mon, 4 Apr 2011 10:37:34 +0900 Subject: [PATCH] use old-style FileResource for 1.5 compatibility --- src/test/java/org/xerial/snappy/SnappyInputStreamTest.java | 3 ++- src/test/java/org/xerial/snappy/SnappyOutputStreamTest.java | 3 ++- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/src/test/java/org/xerial/snappy/SnappyInputStreamTest.java b/src/test/java/org/xerial/snappy/SnappyInputStreamTest.java index d167bfb..303f9fb 100755 --- a/src/test/java/org/xerial/snappy/SnappyInputStreamTest.java +++ b/src/test/java/org/xerial/snappy/SnappyInputStreamTest.java @@ -41,7 +41,8 @@ public class SnappyInputStreamTest private static Logger _logger = Logger.getLogger(SnappyInputStreamTest.class); 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); return readFully(input); } diff --git a/src/test/java/org/xerial/snappy/SnappyOutputStreamTest.java b/src/test/java/org/xerial/snappy/SnappyOutputStreamTest.java index 77113fa..406ef7f 100755 --- a/src/test/java/org/xerial/snappy/SnappyOutputStreamTest.java +++ b/src/test/java/org/xerial/snappy/SnappyOutputStreamTest.java @@ -42,7 +42,8 @@ public class SnappyOutputStreamTest ByteArrayOutputStream buf = new ByteArrayOutputStream(); 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); ByteArrayOutputStream orig = new ByteArrayOutputStream();