protected final SourceAttribute inflateAttribute(final Buffer buffer, final SourceAttribute attribute) { if (attribute instanceof BlobAttribute) { buffer.reset(attribute.getLength()); final BlobAttribute blobAttribute = (BlobAttribute) attribute; System.arraycopy( blobAttribute.getData(), 0, buffer.array(), 0, attribute.getLength() ); return readAttributeCore( attribute.getName(), buffer, blobAttribute.getDataOffset(), attribute.getLength() ); } return attribute; }
protected final SourceAttribute inflateAttribute(final Buffer buffer, final SourceAttribute attribute) { if (attribute instanceof BlobAttribute) { buffer.reset(attribute.getLength()); final BlobAttribute blobAttribute = (BlobAttribute) attribute; System.arraycopy( blobAttribute.getData(), 0, buffer.array(), 0, attribute.getLength() ); return readAttributeCore( attribute.getName(), buffer, blobAttribute.getDataOffset(), attribute.getLength() ); } return attribute; }
protected final SourceAttribute inflateAttribute(final Buffer buffer, final SourceAttribute attribute) { if (attribute instanceof BlobAttribute) { buffer.reset(attribute.getLength()); final BlobAttribute blobAttribute = (BlobAttribute) attribute; System.arraycopy( blobAttribute.getData(), 0, buffer.array(), 0, attribute.getLength() ); return readAttributeCore( attribute.getName(), buffer, blobAttribute.getDataOffset(), attribute.getLength() ); } return attribute; }
protected void inflateAttributes(final SourceAttribute[] attributes) { VerifyArgument.noNullElements(attributes, "attributes"); if (attributes.length == 0) { return; } Buffer buffer = null; for (int i = 0; i < attributes.length; i++) { final SourceAttribute attribute = attributes[i]; if (attribute instanceof BlobAttribute) { if (buffer == null) { buffer = new Buffer(attribute.getLength()); } attributes[i] = inflateAttribute(buffer, attribute); } } }
protected void inflateAttributes(final SourceAttribute[] attributes) { VerifyArgument.noNullElements(attributes, "attributes"); if (attributes.length == 0) { return; } Buffer buffer = null; for (int i = 0; i < attributes.length; i++) { final SourceAttribute attribute = attributes[i]; if (attribute instanceof BlobAttribute) { if (buffer == null) { buffer = new Buffer(attribute.getLength()); } attributes[i] = inflateAttribute(buffer, attribute); } } }
protected void inflateAttributes(final SourceAttribute[] attributes) { VerifyArgument.noNullElements(attributes, "attributes"); if (attributes.length == 0) { return; } Buffer buffer = null; for (int i = 0; i < attributes.length; i++) { final SourceAttribute attribute = attributes[i]; if (attribute instanceof BlobAttribute) { if (buffer == null) { buffer = new Buffer(attribute.getLength()); } attributes[i] = inflateAttribute(buffer, attribute); } } }