Package com.sleepycat.util

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


   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

   @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

   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

                            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

            /*
             * 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

                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

        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

            /*
             * 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

                        new ByteArrayInputStream(data.getData(),
                                                 data.getOffset(),
                                                 data.getSize()));
                classFormat = (ObjectStreamClass) ois.readObject();
            } catch (IOException e) {
                throw new RuntimeExceptionWrapper(e);
            }

            /* Update the class format map. */

            formatMap.put(classIDObj, classFormat);
View Full Code Here

TOP

Related Classes of com.sleepycat.util.RuntimeExceptionWrapper

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.