LapisSea

Untitled

Jun 19th, 2018
474
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.54 KB | None | 0 0
  1. //============LOG============//
  2. [main] [Main.main:28]: CachedRawModel(modelData=[1, 2, 3, 4, 5, 6, 7, 8, 9], indexCount=1, vertexFormat=[0, 1, 2])
  3. WARNING: An illegal reflective access operation has occurred
  4. 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)
  5. WARNING: Please consider reporting this to the maintainers of com.esotericsoftware.kryo.util.UnsafeUtil
  6. WARNING: Use --illegal-access=warn to enable warnings of further illegal reflective access operations
  7. WARNING: All illegal access operations will be denied in a future release
  8. [main] [Main.main:38]: CachedRawModel(modelData=[1, 2, 3, 4, 5, 6, 7, 8, 9], indexCount=1, vertexFormat=[0, 1, 2])
  9.  
  10.  
  11.  
  12. //============TEST_CODE============//
  13. CachedRawModel test=new CachedRawModel(new byte[]{1, 2, 3, 4, 5, 6, 7, 8, 9}, 1, new int[]{0, 1, 2});
  14. LogUtil.println(test);
  15. try{
  16.  
  17. Kryo kryo=new Kryo();
  18.  
  19. try(Output output=new Output(new FileOutputStream("file.bin"))){
  20. kryo.writeObject(output, test);
  21. }
  22.  
  23. try(Input input=new Input(new FileInputStream("file.bin"))){
  24. LogUtil.println(kryo.readObject(input, CachedRawModel.class));
  25. }
  26.  
  27. }catch(IOException e){}
  28.  
  29.  
  30.  
  31. //============CLASS============//
  32. class CachedRawModel(
  33. var modelData: ByteArray=ByteArray(0),
  34. var indexCount: Int=0,
  35. var vertexFormat: IntArray=IntArray(0)
  36. ) {
  37.  
  38. fun getFormat()=VkModelFormat(vertexFormat)
  39.  
  40. }
Add Comment
Please, Sign In to add comment