Examples of RuntimeExceptionWrapper


Examples of com.sleepycat.bdb.util.RuntimeExceptionWrapper

    public void testRuntimeWrapper()
        throws Exception {

        try {
            throw new RuntimeExceptionWrapper(new IOException("msg"));
        } catch (RuntimeException e) {
            Exception ee = ExceptionUnwrapper.unwrap(e);
            assertTrue(ee instanceof IOException);
            assertEquals("msg", ee.getMessage());
View Full Code Here

Examples of com.sleepycat.util.RuntimeExceptionWrapper

   public InternalCacheEntry entryToObject(DatabaseEntry entry) {
      try {
         return (InternalCacheEntry) m.objectFromByteBuffer(entry.getData());
      } catch (IOException e) {
         throw new RuntimeExceptionWrapper(e);
      } catch (ClassNotFoundException e) {
         throw new RuntimeExceptionWrapper(e);
      }
   }
View Full Code Here

Examples of com.sleepycat.util.RuntimeExceptionWrapper

   public void objectToEntry(InternalCacheEntry object, DatabaseEntry entry) {
      byte[] b;
      try {
         b = m.objectToByteBuffer(object);
      } catch (IOException e) {
         throw new RuntimeExceptionWrapper(e);
      } catch (InterruptedException ie) {
         Thread.currentThread().interrupt();
         throw new RuntimeExceptionWrapper(ie);
      }
      entry.setData(b);
   }
View Full Code Here

Examples of com.sleepycat.util.RuntimeExceptionWrapper

   @Override
   public InternalCacheEntry entryToObject(DatabaseEntry entry) {
      try {
         return (InternalCacheEntry) m.objectFromByteBuffer(entry.getData());
      } catch (IOException e) {
         throw new RuntimeExceptionWrapper(e);
      } catch (ClassNotFoundException e) {
         throw new RuntimeExceptionWrapper(e);
      }
   }
View Full Code Here

Examples of com.sleepycat.util.RuntimeExceptionWrapper

   public void objectToEntry(InternalCacheEntry object, DatabaseEntry entry) {
      byte[] b;
      try {
         b = m.objectToByteBuffer(object);
      } catch (IOException e) {
         throw new RuntimeExceptionWrapper(e);
      } catch (InterruptedException ie) {
         Thread.currentThread().interrupt();
         throw new RuntimeExceptionWrapper(ie);
      }
      entry.setData(b);
   }
View Full Code Here

Examples of com.sleepycat.util.RuntimeExceptionWrapper

                            dbConfig.getTransactional();
            readUncommittedAllowed = DbCompat.getReadUncommitted(dbConfig);
            btreeRecNumDb = recNumAllowed && DbCompat.isTypeBtree(dbConfig);
            range = new KeyRange(dbConfig.getBtreeComparator());
        } catch (DatabaseException e) {
            throw new RuntimeExceptionWrapper(e);
        }
        this.writeAllowed = writeAllowed;
        this.keyBinding = keyBinding;
        this.valueBinding = valueBinding;
        this.entityBinding = entityBinding;
View Full Code Here

Examples of com.sleepycat.util.RuntimeExceptionWrapper

            /*
             * Do not throw IOException from here since ObjectOutputStream
             * will write the exception to the stream, which causes another
             * call here, etc.
             */
            throw new RuntimeExceptionWrapper(e);
        } catch (ClassNotFoundException e) {
            throw new RuntimeExceptionWrapper(e);
        }
    }
View Full Code Here

Examples of com.sleepycat.util.RuntimeExceptionWrapper

                new FastInputStream(bufWithHeader, 0, bufWithHeader.length),
                classCatalog,
                getClassLoader());
            return jin.readObject();
        } catch (IOException e) {
            throw new RuntimeExceptionWrapper(e);
        } catch (ClassNotFoundException e) {
            throw new RuntimeExceptionWrapper(e);
        }
    }
View Full Code Here

Examples of com.sleepycat.util.RuntimeExceptionWrapper

        FastOutputStream fo = getSerialOutput(object);
        try {
            SerialOutput jos = new SerialOutput(fo, classCatalog);
            jos.writeObject(object);
        } catch (IOException e) {
            throw new RuntimeExceptionWrapper(e);
        }

        byte[] hdr = SerialOutput.getStreamHeader();
        entry.setData(fo.getBufferBytes(), hdr.length,
                     fo.getBufferLength() - hdr.length);
View Full Code Here

Examples of com.sleepycat.util.RuntimeExceptionWrapper

            /*
             * Do not throw IOException from here since ObjectOutputStream
             * will write the exception to the stream, which causes another
             * call here, etc.
             */
            throw new RuntimeExceptionWrapper(e);
        }
    }
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.