mirror of
https://github.com/xerial/snappy-java.git
synced 2025-07-26 23:44:10 +02:00
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>
|
<resource>
|
||||||
<directory>src/main/resources</directory>
|
<directory>src/main/resources</directory>
|
||||||
<includes>
|
<includes>
|
||||||
|
<include>org/xerial/snappy/*.bytecode</include>
|
||||||
<include>org/xerial/snappy/native/**</include>
|
<include>org/xerial/snappy/native/**</include>
|
||||||
</includes>
|
</includes>
|
||||||
</resource>
|
</resource>
|
||||||
|
@ -95,7 +95,8 @@ public class SnappyLoader
|
|||||||
private static byte[] getByteCode(String resourcePath) throws IOException {
|
private static byte[] getByteCode(String resourcePath) throws IOException {
|
||||||
|
|
||||||
InputStream in = SnappyLoader.class.getResourceAsStream(resourcePath);
|
InputStream in = SnappyLoader.class.getResourceAsStream(resourcePath);
|
||||||
assert (in != null);
|
if (in == null)
|
||||||
|
throw new IOException(resourcePath + " is not found");
|
||||||
byte[] buf = new byte[1024];
|
byte[] buf = new byte[1024];
|
||||||
ByteArrayOutputStream byteCodeBuf = new ByteArrayOutputStream();
|
ByteArrayOutputStream byteCodeBuf = new ByteArrayOutputStream();
|
||||||
for (int readLength; (readLength = in.read(buf)) != -1;) {
|
for (int readLength; (readLength = in.read(buf)) != -1;) {
|
||||||
|
BIN
src/main/resources/org/xerial/snappy/SnappyNativeLoader.bytecode
Executable file
BIN
src/main/resources/org/xerial/snappy/SnappyNativeLoader.bytecode
Executable file
Binary file not shown.
Binary file not shown.
Loading…
x
Reference in New Issue
Block a user