Package org.mozilla.javascript

Examples of org.mozilla.javascript.ConsString


      }
  }

  public void testConsStringSerialization() throws IOException, ClassNotFoundException {
     
      ConsString r1 = new ConsString("foo", "bar");
     
      ByteArrayOutputStream baos = new ByteArrayOutputStream();
      ObjectOutputStream oos = new ObjectOutputStream(baos);
     
      oos.writeObject(r1);
     
      oos.flush();
     
      ByteArrayInputStream bais = new ByteArrayInputStream(baos.toByteArray());
     
      ObjectInputStream ois = new ObjectInputStream(bais);
     
      CharSequence r2 = (CharSequence) ois.readObject();
     
      assertEquals("still the same at the other end", r1.toString(), r2.toString());
     
  }
View Full Code Here

TOP

Related Classes of org.mozilla.javascript.ConsString

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.