/** * Casts or wraps the given stream to a TaggedInputStream instance. * * @param proxy normal input stream * @return a TaggedInputStream instance */ public static TaggedInputStream get(InputStream proxy) { if(proxy instanceof TaggedInputStream) { return (TaggedInputStream)proxy; } return new TaggedInputStream(proxy); }
@Test public void createdIOExceptionIsSerializable() { try { new TaggedInputStream(null).handleIOException(new IOException("Dummy")); } catch (IOException e) { assertCanSerialize(e); } }
/** * Casts or wraps the given stream to a TaggedInputStream instance. * * @param proxy normal input stream * @return a TaggedInputStream instance */ public static TaggedInputStream get(InputStream proxy) { if(proxy instanceof TaggedInputStream) { return (TaggedInputStream)proxy; } return new TaggedInputStream(proxy); }
/** * Casts or wraps the given stream to a TaggedInputStream instance. * * @param proxy normal input stream * @return a TaggedInputStream instance */ public static TaggedInputStream get(InputStream proxy) { if(proxy instanceof TaggedInputStream) { return (TaggedInputStream)proxy; } return new TaggedInputStream(proxy); }