private void serializeContentClaim(final ContentClaim claim, final long offset, final DataOutputStream out) throws IOException { if (claim == null) { out.write(0); } else { out.write(1); final ResourceClaim resourceClaim = claim.getResourceClaim(); writeString(resourceClaim.getId(), out); writeString(resourceClaim.getContainer(), out); writeString(resourceClaim.getSection(), out); out.writeLong(claim.getOffset()); out.writeLong(claim.getLength()); out.writeLong(offset); out.writeBoolean(resourceClaim.isLossTolerant()); } }
@Override public Object getFieldValue(final String fieldName) { switch (fieldName) { case ContentClaimSchema.CLAIM_CONTAINER: return resourceClaim.getContainer(); case ContentClaimSchema.CLAIM_SECTION: return resourceClaim.getSection(); case ContentClaimSchema.CLAIM_IDENTIFIER: return resourceClaim.getId(); case ContentClaimSchema.LOSS_TOLERANT: return resourceClaim.isLossTolerant(); } return null; }
out.writeLong(claim.getLength()); out.writeLong(flowFile.getContentClaimOffset()); out.writeBoolean(resourceClaim.isLossTolerant());
@Override public Object getFieldValue(final String fieldName) { switch (fieldName) { case ContentClaimSchema.CLAIM_CONTAINER: return resourceClaim.getContainer(); case ContentClaimSchema.CLAIM_SECTION: return resourceClaim.getSection(); case ContentClaimSchema.CLAIM_IDENTIFIER: return resourceClaim.getId(); case ContentClaimSchema.LOSS_TOLERANT: return resourceClaim.isLossTolerant(); } return null; }
private void serializeContentClaim(final ContentClaim claim, final long offset, final DataOutputStream out) throws IOException { if (claim == null) { out.write(0); } else { out.write(1); final ResourceClaim resourceClaim = claim.getResourceClaim(); writeString(resourceClaim.getId(), out); writeString(resourceClaim.getContainer(), out); writeString(resourceClaim.getSection(), out); out.writeLong(claim.getOffset()); out.writeLong(claim.getLength()); out.writeLong(offset); out.writeBoolean(resourceClaim.isLossTolerant()); } }