Package org.exoplatform.services.jcr.impl.util.io

Examples of org.exoplatform.services.jcr.impl.util.io.SwapFile.spoolDone()


         if (valueResultSet != null)
            valueResultSet.close();
         if (out != null)
         {
            out.close();
            swapFile.spoolDone();
         }
      }

      if (buffer == null)
      {
View Full Code Here


               {
                  writeValueHelper.writeStreamedValue(swapFile, streamData);
               }
               finally
               {
                  swapFile.spoolDone();
               }

               long vlen = swapFile.length();
               if (vlen <= Integer.MAX_VALUE)
               {
View Full Code Here

               {
                  writeValueHelper.writeStreamedValue(swapFile, streamData);
               }
               finally
               {
                  swapFile.spoolDone();
               }

               long vlen = swapFile.length();
               if (vlen <= Integer.MAX_VALUE)
               {
View Full Code Here

      finally
      {
         if (out != null)
         {
            out.close();
            swapFile.spoolDone();
         }
      }

      if (buffer == null)
      {
View Full Code Here

               {
                  writeValueHelper.writeStreamedValue(swapFile, streamData);
               }
               finally
               {
                  swapFile.spoolDone();
               }

               long vlen = PrivilegedFileHelper.length(swapFile);
               if (vlen <= Integer.MAX_VALUE)
               {
View Full Code Here

   }

   public void testDeleteAbstractSwapFile() throws IOException
   {
      SwapFile sf = SwapFile.get(new File(DIR_NAME), FILE_NAME);
      sf.spoolDone();

      // File on disk does not exist. It will not be removed from disk space.
      assertTrue("File should be deleted.", sf.delete());
   }
View Full Code Here

      // write to file
      OutputStream out = new FileOutputStream(sf);
      byte[] outWrite = new byte[]{1, 2, 3};
      out.write(outWrite);
      out.close();
      sf.spoolDone();

      // File is present on the disk. It will be removed from disk space.
      assertTrue("File should be deleted.", sf.delete());
   }
  
View Full Code Here

                  is.close();
               }
               OutputStream out = new FileOutputStream(sf);
               out.write(value);
               out.close();
               sf.spoolDone();
            }
            catch (Exception e)
            {
               ex.set(e);
            }
View Full Code Here

      SwapFile sf = SwapFile.get(parentDir, FILE_NAME,testCleaner);
      FileOutputStream fout = new FileOutputStream(sf);
      fout.write("testFileCleaned".getBytes());
      fout.close();
      sf.spoolDone();

      cleanableValueData = new CleanableFilePersistedValueData(1, sf, SpoolConfig.getDefaultSpoolConfig());
   }

   @Override
View Full Code Here

   public void testGetSwapFile() throws IOException
   {
      // Get swap file is possible only in this way.
      SwapFile sf = SwapFile.get(new File(DIR_NAME), FILE_NAME);
      assertNotNull("File should be created.", sf);
      sf.spoolDone();
      sf.delete();
   }

   public void testIsSpooled() throws IOException
   {
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.