Examples of CNDStreamReader


Examples of org.exoplatform.services.jcr.impl.core.nodetype.registration.CNDStreamReader

      System.setOut(ps);
      System.setErr(ps2);

      try
      {
         return new CNDStreamReader(namespaceRegistry).read(new ByteArrayInputStream(line.getBytes()));
      }
      finally
      {
         System.setOut(console); // Reset standard output
         System.setErr(consoleErr); // Reset standard err
View Full Code Here

Examples of org.exoplatform.services.jcr.impl.core.nodetype.registration.CNDStreamReader

      /** input stream */
      InputStream is = getClass().getClassLoader().getResourceAsStream("" + TEST_FILE);
      ByteArrayOutputStream baos = new ByteArrayOutputStream();
      NamespaceRegistryImpl nsm = new NamespaceRegistryImpl();
      /** reading and writing */
      List<NodeTypeData> ntdList1 = new CNDStreamReader(nsm).read(is);
      new CNDStreamWriter(nsm).write(ntdList1, baos);
      /** new reader to read previous output */
      List<NodeTypeData> ntdList2 = new CNDStreamReader(nsm).read(new ByteArrayInputStream(baos.toByteArray()));
      /** checking equality */
      if (ntdList1.size() == 0 || ntdList1.size() != ntdList2.size())
      {
         fail("Exported node type definition was not successfully read back in");
      }
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.