Package com.peterhi.io

Examples of com.peterhi.io.PmInputStream.readModel()


    InstantiationException {
    InputStream stream = event.getInputStream();
   
    PmInputStream pis = new PmInputStream(stream);
    stream.mark(0);
    PropModel sink = pis.readModel();
    stream.reset();
    pis.close();
    return sink;
  }
 
View Full Code Here


 
  private PropModel readModel(RudpEvent event) throws Exception {
    InputStream stream = event.getInputStream();
    stream.mark(0);
    PmInputStream pis = new PmInputStream(stream);
    PropModel model = pis.readModel();
    stream.reset();
    pis.close();
    return model;
  }
 
View Full Code Here

    PmOutputStream pos = new PmOutputStream(baos);
    pos.writeModel(p0);
   
    ByteArrayInputStream bais = new ByteArrayInputStream(baos.toByteArray());
    PmInputStream pis = new PmInputStream(bais);
    Primitives p1 = pis.readModel();
   
    Assert.assertEquals(0, pis.available());
    pos.close();
    pis.close();
   
View Full Code Here

    pos.writeModel(bNull);
    pos.writeModel(b0);
   
    ByteArrayInputStream bais = new ByteArrayInputStream(baos.toByteArray());
    PmInputStream pis = new PmInputStream(bais);
    Boxers bNull2 = pis.readModel();
    Boxers b1 = pis.readModel();
   
    Assert.assertEquals(0, pis.available());
    pos.close();
    pis.close();
View Full Code Here

    pos.writeModel(b0);
   
    ByteArrayInputStream bais = new ByteArrayInputStream(baos.toByteArray());
    PmInputStream pis = new PmInputStream(bais);
    Boxers bNull2 = pis.readModel();
    Boxers b1 = pis.readModel();
   
    Assert.assertEquals(0, pis.available());
    pos.close();
    pis.close();
   
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.