Move pregenerated bytecode to resource folder
This commit is contained in:
parent
4ee2936297
commit
8504a9384d
1
pom.xml
1
pom.xml
|
@ -24,6 +24,7 @@
|
|||
<resource>
|
||||
<directory>src/main/resources</directory>
|
||||
<includes>
|
||||
<include>org/xerial/snappy/*.bytecode</include>
|
||||
<include>org/xerial/snappy/native/**</include>
|
||||
</includes>
|
||||
</resource>
|
||||
|
|
|
@ -95,7 +95,8 @@ public class SnappyLoader
|
|||
private static byte[] getByteCode(String resourcePath) throws IOException {
|
||||
|
||||
InputStream in = SnappyLoader.class.getResourceAsStream(resourcePath);
|
||||
assert (in != null);
|
||||
if (in == null)
|
||||
throw new IOException(resourcePath + " is not found");
|
||||
byte[] buf = new byte[1024];
|
||||
ByteArrayOutputStream byteCodeBuf = new ByteArrayOutputStream();
|
||||
for (int readLength; (readLength = in.read(buf)) != -1;) {
|
||||
|
|
Binary file not shown.
Binary file not shown.
Loading…
Reference in New Issue