Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- //============LOG============//
- [main] [Main.main:28]: CachedRawModel(modelData=[1, 2, 3, 4, 5, 6, 7, 8, 9], indexCount=1, vertexFormat=[0, 1, 2])
- WARNING: An illegal reflective access operation has occurred
- WARNING: Illegal reflective access by com.esotericsoftware.kryo.util.UnsafeUtil (file:/C:/Users/LapisSea/.m2/repository/com/esotericsoftware/kryo/3.1.0-SNAPSHOT/kryo-3.1.0-20160701.184916-22.jar) to constructor java.nio.DirectByteBuffer(long,int,java.lang.Object)
- WARNING: Please consider reporting this to the maintainers of com.esotericsoftware.kryo.util.UnsafeUtil
- WARNING: Use --illegal-access=warn to enable warnings of further illegal reflective access operations
- WARNING: All illegal access operations will be denied in a future release
- [main] [Main.main:38]: CachedRawModel(modelData=[1, 2, 3, 4, 5, 6, 7, 8, 9], indexCount=1, vertexFormat=[0, 1, 2])
- //============TEST_CODE============//
- CachedRawModel test=new CachedRawModel(new byte[]{1, 2, 3, 4, 5, 6, 7, 8, 9}, 1, new int[]{0, 1, 2});
- LogUtil.println(test);
- try{
- Kryo kryo=new Kryo();
- try(Output output=new Output(new FileOutputStream("file.bin"))){
- kryo.writeObject(output, test);
- }
- try(Input input=new Input(new FileInputStream("file.bin"))){
- LogUtil.println(kryo.readObject(input, CachedRawModel.class));
- }
- }catch(IOException e){}
- //============CLASS============//
- class CachedRawModel(
- var modelData: ByteArray=ByteArray(0),
- var indexCount: Int=0,
- var vertexFormat: IntArray=IntArray(0)
- ) {
- fun getFormat()=VkModelFormat(vertexFormat)
- }
Add Comment
Please, Sign In to add comment