public RevTag readTag(@Nullable ObjectId id, DataInput in) throws IOException { final ObjectId commitId = readObjectId(in); final String name = in.readUTF(); final String message = in.readUTF(); final RevPerson tagger = readRevPerson(in); return RevTag.builder().build(id, name, commitId, message, tagger); }
public NodeRef readNodeRef(DataInput in) throws IOException { Node node = readNode(in); final ObjectId metadataId = readObjectId(in); String parentPath = in.readUTF(); return new NodeRef(node, parentPath, metadataId); }
public NodeRef readNodeRef(DataInput in) throws IOException { Node node = readNode(in); final ObjectId metadataId = readObjectId(in); String parentPath = in.readUTF(); return new NodeRef(node, parentPath, metadataId); }
/** * Reads a bucket body (i.e assumes the head unsigned int "index" has been read already) */ protected Bucket readBucketBody(DataInput in) throws IOException { ObjectId objectId = readObjectId(in); final int boundsMask = in.readByte() & 0xFF; @Nullable final Envelope bounds; if (BOUNDS_POINT_MASK == boundsMask) { bounds = readPointBoundingBox(in); } else if (BOUNDS_BOX2D_MASK == boundsMask) { bounds = readBoundingBox(in); } else { bounds = null; } return Bucket.create(objectId, bounds); }
final ObjectId objectId = readObjectId(in); ObjectId metadataId = ObjectId.NULL; if (metadataMask == METADATA_PRESENT_MASK) { metadataId = readObjectId(in);
final ObjectId objectId = readObjectId(in); ObjectId metadataId = ObjectId.NULL; if (metadataMask == METADATA_PRESENT_MASK) { metadataId = readObjectId(in);
public RevCommit readCommit(@Nullable ObjectId id, DataInput in) throws IOException { final ObjectId treeId = readObjectId(in); final int nParents = readUnsignedVarInt(in); final Builder<ObjectId> parentListBuilder = ImmutableList.builder(); for (int i = 0; i < nParents; i++) { ObjectId parentId = readObjectId(in); parentListBuilder.add(parentId); } final RevPerson author = readRevPerson(in); final RevPerson committer = readRevPerson(in); final String message = in.readUTF(); final List<ObjectId> parents = parentListBuilder.build(); RevCommit commit; if (id == null) { commit = RevCommit.builder().build(treeId, parents, author, committer, message); } else { commit = RevObjectFactory.defaultInstance().createCommit(id, treeId, parents, author, committer, message); } return commit; }
public RevTag readTag(@Nullable ObjectId id, DataInput in) throws IOException { final ObjectId commitId = readObjectId(in); final String name = in.readUTF(); final String message = in.readUTF(); final RevPerson tagger = readRevPerson(in); RevTag tag; if (id == null) { tag = RevTagBuilder.create(ObjectId.NULL, name, commitId, message, tagger); id = new HashObject().setObject(tag).call(); } tag = RevTagBuilder.create(id, name, commitId, message, tagger); return tag; }
/** * Reads a bucket body (i.e assumes the head unsigned int "index" has been read already) * * @param bucketIndex */ protected Bucket readBucketBody(int bucketIndex, DataInput in) throws IOException { ObjectId objectId = readObjectId(in); final int boundsMask = in.readByte() & 0xFF; @Nullable final Envelope bounds; if (BOUNDS_POINT_MASK == boundsMask) { bounds = readPointBoundingBox(in); } else if (BOUNDS_BOX2D_MASK == boundsMask) { bounds = readBoundingBox(in); } else { bounds = null; } return RevObjectFactory.defaultInstance().createBucket(objectId, bucketIndex, bounds); }
public RevCommit readCommit(@Nullable ObjectId id, DataInput in) throws IOException { final ObjectId treeId = readObjectId(in); final int nParents = readUnsignedVarInt(in); final Builder<ObjectId> parentListBuilder = ImmutableList.builder(); for (int i = 0; i < nParents; i++) { ObjectId parentId = readObjectId(in); parentListBuilder.add(parentId); } final RevPerson author = readRevPerson(in); final RevPerson committer = readRevPerson(in); final String message = in.readUTF(); ObjectId commitId = id; if (id == null) { commitId = ObjectId.NULL; } RevCommit commit = CommitBuilder.create(commitId, treeId, parentListBuilder.build(), author, committer, message); if (id == null) { commitId = new HashObject().setObject(commit).call(); commit = CommitBuilder.create(commitId, treeId, parentListBuilder.build(), author, committer, message); } return commit; }