Package org.exoplatform.services.jcr.impl.dataflow.serialization

Examples of org.exoplatform.services.jcr.impl.dataflow.serialization.PersistedValueDataReader


      // read first time
      ObjectReader or = new ObjectReaderImpl(new FileInputStream(serf));

      FilePersistedValueData vd1 = null;

      PersistedValueDataReader vdr = new PersistedValueDataReader(fileCleaner, maxBufferSize, holder);
      try
      {
         vd1 = (FilePersistedValueData)vdr.read(or);
      }
      catch (UnknownClassIdException e)
      {
         fail(e.getMessage());
      }

      or.close();
      // Imitation save
      ((StreamPersistedValueData) vd1).setPersistedFile(((StreamPersistedValueData) vd1).getTempFile());

      // read second time
      or = new ObjectReaderImpl(new FileInputStream(serf));
      FilePersistedValueData vd2 = null;

      try
      {
         vd2 = (FilePersistedValueData)vdr.read(or);
      }
      catch (UnknownClassIdException e)
      {
         fail(e.getMessage());
      }
View Full Code Here


      // read first time
      ObjectReader or = new ObjectReaderImpl(new FileInputStream(serf));

      FilePersistedValueData vd1 = null;

      PersistedValueDataReader vdr = new PersistedValueDataReader(holder, SpoolConfig.getDefaultSpoolConfig());
      try
      {
         vd1 = (FilePersistedValueData)vdr.read(or, PropertyType.BINARY);
      }
      catch (UnknownClassIdException e)
      {
         fail(e.getMessage());
      }

      or.close();
      // Imitation save
      ((StreamPersistedValueData) vd1).setPersistedFile(((StreamPersistedValueData) vd1).getTempFile());

      // read second time
      or = new ObjectReaderImpl(new FileInputStream(serf));
      FilePersistedValueData vd2 = null;

      try
      {
         vd2 = (FilePersistedValueData)vdr.read(or, PropertyType.BINARY);
      }
      catch (UnknownClassIdException e)
      {
         fail(e.getMessage());
      }
View Full Code Here

TOP

Related Classes of org.exoplatform.services.jcr.impl.dataflow.serialization.PersistedValueDataReader

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.