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

Examples of org.exoplatform.services.jcr.impl.dataflow.persistent.ByteArrayPersistedValueData


{

   public void testCreateByteArrayValueData() throws Exception
   {
      byte[] buf = "0123456789".getBytes();
      ByteArrayPersistedValueData vd = new ByteArrayPersistedValueData(0, buf);
      assertTrue(vd.isByteArray());
      assertEquals(10, vd.getLength());
      assertEquals(0, vd.getOrderNumber());
      assertEquals(10, vd.getAsByteArray().length);
      assertTrue(vd.getAsStream() instanceof ByteArrayInputStream);
   }
View Full Code Here


      protected void readData(ResultSet item) throws SQLException, ValueStorageNotFoundException, IOException
      {
         byte[] internalData = item.getBytes(COLUMN_VDATA);

         data = new ByteArrayPersistedValueData(orderNum, internalData);
         size = internalData.length;
      }
View Full Code Here

            while ((r = is.read(buff)) >= 0)
            {
               System.arraycopy(buff, 0, res, rpos, r);
               rpos += r;
            }
            return new ByteArrayPersistedValueData(orderNum, res);
         }
         finally
         {
            is.close();
         }
View Full Code Here

      }

      public TempPropertyData(ResultSet item, boolean readValue) throws SQLException
      {
         orderNum = item.getInt(COLUMN_VORDERNUM);
         data = readValue ? new ByteArrayPersistedValueData(orderNum, item.getBytes(COLUMN_VDATA)) : null;
      }
View Full Code Here

      if (buffer == null)
      {
         return new CleanableFilePersistedValueData(orderNumber, swapFile, swapCleaner);
      }

      return new ByteArrayPersistedValueData(orderNumber, buffer);
   }
View Full Code Here

      protected void readData(ResultSet item) throws SQLException, ValueStorageNotFoundException, IOException
      {
         byte[] internalData = item.getBytes(COLUMN_VDATA);

         data = new ByteArrayPersistedValueData(orderNum, internalData);
         size = internalData.length;
      }
View Full Code Here

      }

      public TempPropertyData(ResultSet item, boolean readValue) throws SQLException
      {
         orderNum = item.getInt(COLUMN_VORDERNUM);
         data = readValue ? new ByteArrayPersistedValueData(orderNum, item.getBytes(COLUMN_VDATA)) : null;
      }
View Full Code Here

      if (buffer == null)
      {
         return new CleanableFilePersistedValueData(orderNumber, swapFile, swapCleaner);
      }

      return new ByteArrayPersistedValueData(orderNumber, buffer);
   }
View Full Code Here

      if (buffer == null)
      {
         return new CleanableFilePersistedValueData(orderNumber, swapFile, swapCleaner);
      }

      return new ByteArrayPersistedValueData(orderNumber, buffer);
   }
View Full Code Here

       * Constructor TempPropertyData.
       */
      public TempPropertyData(ResultSet item, boolean readValue) throws SQLException, IOException
      {
         orderNum = item.getInt(COLUMN_VORDERNUM);
         data = readValue ? new ByteArrayPersistedValueData(orderNum, item.getBytes(COLUMN_VDATA)) : null;
      }
View Full Code Here

TOP

Related Classes of org.exoplatform.services.jcr.impl.dataflow.persistent.ByteArrayPersistedValueData

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.