@Override public RevFeatureType read(ObjectId id, InputStream rawData) throws IllegalArgumentException { DataInput in = new DataInputStream(rawData); try { requireHeader(in, "featuretype"); return readFeatureType(id, in); } catch (IOException e) { throw new RuntimeException(e); } }
@Override public RevFeature read(ObjectId id, InputStream rawData) throws IllegalArgumentException { DataInput in = new DataInputStream(rawData); try { requireHeader(in, "feature"); return readFeature(id, in); } catch (IOException e) { throw new RuntimeException(e); } }
@Override public RevTree read(ObjectId id, InputStream rawData) throws IllegalArgumentException { DataInput in = new DataInputStream(rawData); try { requireHeader(in, "tree"); return readTree(id, in); } catch (IOException e) { throw new RuntimeException(e); } }
public RevTag read(ObjectId id, InputStream in) { DataInput data = new DataInputStream(in); try { FormatCommonV1.requireHeader(data, "tag"); return FormatCommonV1.readTag(id, data); } catch (Exception e) { throw Throwables.propagate(e); } }
@Override public RevCommit read(ObjectId id, InputStream rawData) throws IllegalArgumentException { DataInput in = new DataInputStream(rawData); try { requireHeader(in, "commit"); return readCommit(id, in); } catch (IOException e) { Throwables.throwIfUnchecked(e); throw new RuntimeException(e); } }
public RevTag read(ObjectId id, InputStream in) { DataInput data = new DataInputStream(in); try { FormatCommonV1.requireHeader(data, "tag"); return FormatCommonV1.readTag(id, data); } catch (IOException e) { throw new RuntimeException(e); } }
@Override public RevFeature read(ObjectId id, InputStream rawData) throws IllegalArgumentException { DataInput in = new DataInputStream(rawData); try { requireHeader(in, "feature"); return readFeature(id, in); } catch (IOException e) { Throwables.propagate(e); } throw new IllegalStateException( "Didn't expect to reach end of FeatureReader.read(); We should have returned or thrown an error before this point."); }
@Override public RevFeatureType read(ObjectId id, InputStream rawData) throws IllegalArgumentException { DataInput in = new DataInputStream(rawData); try { requireHeader(in, "featuretype"); return readFeatureType(id, in); } catch (IOException e) { throw new RuntimeException(e); } }
@Override public RevCommit read(ObjectId id, InputStream rawData) throws IllegalArgumentException { DataInput in = new DataInputStream(rawData); try { requireHeader(in, "commit"); return readCommit(id, in); } catch (IOException e) { Throwables.propagate(e); } throw new IllegalStateException( "Unexpected state: neither succeeded nor threw exception while trying to read commit " + id); }
@Override public RevTree read(ObjectId id, InputStream rawData) throws IllegalArgumentException { DataInput in = new DataInputStream(rawData); try { requireHeader(in, "tree"); return readTree(id, in); } catch (IOException e) { Throwables.propagate(e); } throw new IllegalStateException( "Unexpected state: neither succeeded nor threw exception while trying to read commit " + id); }