public static final <T extends Object> T load(InputStream is) throws IOException, ClassNotFoundException { ObjectInputStream ois = new ObjectInputStream(new BufferedInputStream(new GZIPInputStream(is)));
Object obj = ois.readObject();
if (obj instanceof T) { return (T) obj; } else { throw new IllegalArgumentException("引数がおかしい"); } } (注)インデントに全角スペースが入っています