OpcPackage — Aspose.Slides FOSS API référence Java

Vue de l’ensemble

‘OpcPackage’ minimum OPC (Open Packaging Conventions) package soutenu par un fichier ZIP. Navigez sur les propriétés et méthodes dans les tables ci-dessous pour comprendre la surface publique API complète de ce type. Tous les membres énumérés ici font partie de l’API public stable et peuvent être utilisés dans le code de production ciblant l’édition FOSS.

Le package : ‘org.aspose.slides.foss.internal.opc’


Propriétés

PropertyTypeAccessDescription
sourcePathOptional<String>ReadGets or sets the sourcePath value.
partNamesSet<String>Read/WriteThe part names value.

méthodes

MethodReturnsDescription
close()voidClose the package and release resources.
createNew()OpcPackageCreate a new empty OPC package.
deletePart()booleanDelete a part from the package.
getPart()Optional<byte[]>Get the content of a part by name.
getSourcePath()Optional<String>Get the original file path if the package was loaded from a file.
open()OpcPackageOpen an OPC package from a binary input stream.
setPart()voidSet or update the content of a part with string content (encoded as UTF-8).
load(InputStream in)voidLoads a package from a ZIP input stream.
save(OutputStream out)voidSaves the package as a ZIP archive to the given output stream.
hasPart(String uri)booleanReturns whether a part with the given URI exists.
getPartBytes(String uri)byte[]Returns the raw bytes of the given part, or null if not found.
setPartBytes(String uri, byte[] data)voidSets the raw bytes for the given part URI.
removePart(String uri)voidRemoves a part by URI.
getPartNames()Set<String>Returns all part URIs as an unmodifiable set.
clear()voidClears all parts, releasing memory held by byte arrays.
parseXml(String uri)DocumentParses the given part as an XML document.
serializeXml(String uri, Document doc)voidSerializes the given XML document and stores it as a part.
newDocument()DocumentCreates a new empty XML document.

Voir aussi

  • Aspose.Slides FOSS API Java Résultats de référence maison
  • Aspose.Slides - référence API d’entreprise
 Français