Examples of BinaryWriter


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

Examples of aterm.pure.binary.BinaryWriter

  }
 
  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

Examples of org.postgis.binary.BinaryWriter

    this.file = file;
   
    midRecord = false;
   
    dateFormat = new SimpleDateFormat("yyyy-MM-dd HH:mm:ssZ");
    postgisBinaryWriter = new BinaryWriter();
  }
View Full Code Here

Examples of org.postgis.binary.BinaryWriter

    this.file = file;
   
    midRecord = false;
   
    dateFormat = new SimpleDateFormat("yyyy-MM-dd HH:mm:ssZ");
    postgisBinaryWriter = new BinaryWriter();
  }
View Full Code Here

Examples of org.postgis.binary.BinaryWriter

  public void nullSafeSet(PreparedStatement statement,
          Object value, int index) throws HibernateException, SQLException {
      if (value == null) {
          statement.setBytes(index, null);
        } else {
        BinaryWriter bw = new BinaryWriter();
       
        byte[] bytes = bw.writeBinary((Geometry)value);
          statement.setBytes(index, bytes);
        }
  }
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. 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.