Package aterm.pure.binary

Examples of aterm.pure.binary.BinaryWriter


    write(input, expectedResult);
  }
 
  public void write(ATerm input, byte[] expectedResult) throws Exception{
    ByteBuffer buffer = ByteBuffer.allocate(expectedResult.length + 10);
    BinaryWriter bw = new BinaryWriter(input);
    bw.serialize(buffer);
    byte[] result = new byte[buffer.limit()];
    buffer.get(result);
   
    int expectedResultLength = expectedResult.length;
    int resultLength = result.length;
View Full Code Here


  }
 
  public void testChunkification() throws VisitFailure{
    ATerm in = makeBigDummyTerm(2500);
    ByteBuffer buffer = ByteBuffer.allocate(1000);
    BinaryWriter bw = new BinaryWriter(in);
    BinaryReader binaryReader = new BinaryReader(pureFactory);
   
    while(!binaryReader.isDone()){
      buffer.clear();
      bw.serialize(buffer);
      binaryReader.deserialize(buffer);
    }
   
    ATerm result = binaryReader.getRoot();
   
View Full Code Here

TOP

Related Classes of aterm.pure.binary.BinaryWriter

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.