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, setVersionaddTargetPart, addTargetPart, addTargetPart, addTargetPart, getContentType, getPartName, getRelationshipsPart, getRelationshipsPart, getUserData, reset, setContentType, setPartName, setRelationships, setUserDatapublic BinaryPart(PartName partName) throws InvalidFormatException
InvalidFormatExceptionpublic 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 - IOExceptionpublic byte[] getBytes()
public boolean isContentEqual(Part other) throws Docx4JException
isContentEqual in class PartDocx4JExceptionCopyright © 2007-2022. All Rights Reserved.