private JBossLogReaderInput(InputStream is) { try { in = new JBossObjectInputStream(is); } catch (IOException e) { throw Throwables.propagate(e); } }
public Object deserialize(Object target) throws Exception{ SerializableWrapper wrapper = (SerializableWrapper)target; byte[] payload = wrapper.getPayload(); ByteArrayInputStream bais = new ByteArrayInputStream(payload); ObjectInputStream ois = new ObjectInputStream(bais); JBossObjectInputStream jbis = new JBossObjectInputStream(ois); Object result = jbis.readObject(); return result; } public void serialize(final Object[] targets) throws Exception
public Object get() throws IOException, ClassNotFoundException { ByteArrayInputStream bais = new ByteArrayInputStream(bytes); JBossObjectInputStream ois = new JBossObjectInputStream(bais); try { return ois.readObject(); } finally { ois.close(); bais.close(); } }
public static Object deserialize(byte[] data, ClassLoader classLoader) { ObjectInputStream ois = null; try { try{ //TODO fixes for support old reports ois= new JBossObjectInputStream(new ByteArrayInputStream(data), classLoader); } catch (IOException e){ //data stored not with JBoss ois=new ClassLoaderObjectInputStream(classLoader, new ByteArrayInputStream(data)); } return ois.readObject(); } catch (Exception e) { throw new RuntimeException(e); } finally { try { Closeables.close(ois, true); } catch (IOException e) { log.warn("IOException should not have been thrown.", e); } } }
public ObjectInputStream createInput(InputStream input, ClassLoader loader) throws IOException { if (trace) { log.trace(this + " creating JBossObjectInputStream"); } return new JBossObjectInputStream(input, loader, new StringUtilBuffer(10024, 10024)); }
public Object get() throws IOException, ClassNotFoundException { ByteArrayInputStream bais = new ByteArrayInputStream(bytes); JBossObjectInputStream ois = new JBossObjectInputStream(bais); try { return ois.readObject(); } finally { ois.close(); bais.close(); } }
in = new JBossObjectInputStream(new BufferedInputStream(fis)); try
try{ ois=new JBossObjectInputStream(new ByteArrayInputStream(data)); } catch (IOException e) {
in = new JBossObjectInputStream(new BufferedInputStream(fis)); try