@SuppressWarnings("unchecked") @Override public T read(ByteBuffer entry) throws SerializerException, ClassNotFoundException { ByteBufferInputStream bin = new ByteBufferInputStream(entry); try { try (OIS ois = new OIS(bin, classLoader)) { return (T) ois.readObject(); } } catch (IOException e) { throw new SerializerException(e); } finally { try { bin.close(); } catch (IOException e) { throw new AssertionError(e); } } }
@Override public SoftLock<T> read(ByteBuffer entry) throws SerializerException, ClassNotFoundException { ByteBufferInputStream bin = new ByteBufferInputStream(entry); try { try (OIS ois = new OIS(bin, classLoader)) { return uncheckedCast(ois.readObject()); } } catch (IOException e) { throw new SerializerException(e); } finally { try { bin.close(); } catch (IOException e) { throw new AssertionError(e); } } }
@SuppressWarnings("unchecked") @Override public T read(ByteBuffer entry) throws SerializerException, ClassNotFoundException { ByteBufferInputStream bin = new ByteBufferInputStream(entry); try { try (OIS ois = new OIS(bin, classLoader)) { return (T) ois.readObject(); } } catch (IOException e) { throw new SerializerException(e); } finally { try { bin.close(); } catch (IOException e) { throw new AssertionError(e); } } }
@SuppressWarnings("unchecked") @Override public T read(ByteBuffer entry) throws SerializerException, ClassNotFoundException { ByteBufferInputStream bin = new ByteBufferInputStream(entry); try { try (OIS ois = new OIS(bin, classLoader)) { return (T) ois.readObject(); } } catch (IOException e) { throw new SerializerException(e); } finally { try { bin.close(); } catch (IOException e) { throw new AssertionError(e); } } }