public class BinaryPart extends Part
Modifier and Type | Field and Description |
---|---|
protected static org.slf4j.Logger |
log |
contentType, partName, relationships
Constructor and Description |
---|
BinaryPart(ExternalTarget externalTarget) |
BinaryPart(PartName partName) |
Modifier and Type | Method and Description |
---|---|
ByteBuffer |
getBuffer()
Get the contents of this part.
|
byte[] |
getBytes() |
ExternalTarget |
getExternalTarget() |
boolean |
isContentEqual(Part other) |
boolean |
isLoaded() |
void |
setBinaryData(byte[] bytes) |
void |
setBinaryData(ByteBuffer bb) |
void |
setBinaryData(InputStream binaryData) |
void |
writeDataToOutputStream(OutputStream out)
Copy the ByteBuffer containing this part's binary data
to an output stream.
|
getContentLengthAsLoaded, getOwningRelationshipPart, getPackage, getRelationshipType, getSourceRelationship, getSourceRelationships, getVersion, remove, rename, setContentLengthAsLoaded, setOwningRelationshipPart, setPackage, setPartShortcut, setRelationshipType, setSourceRelationship, setVersion
addTargetPart, addTargetPart, addTargetPart, addTargetPart, getContentType, getPartName, getRelationshipsPart, getRelationshipsPart, getUserData, reset, setContentType, setPartName, setRelationships, setUserData
public BinaryPart(PartName partName) throws InvalidFormatException
InvalidFormatException
public BinaryPart(ExternalTarget externalTarget)
public ExternalTarget getExternalTarget()
public void setBinaryData(InputStream binaryData)
public void setBinaryData(byte[] bytes)
public void setBinaryData(ByteBuffer bb)
public boolean isLoaded()
public ByteBuffer getBuffer()
public void writeDataToOutputStream(OutputStream out) throws IOException
out
- IOException
public byte[] getBytes()
public boolean isContentEqual(Part other) throws Docx4JException
isContentEqual
in class Part
Docx4JException
Copyright © 2007-2018. All Rights Reserved.