public abstract class FormatBase extends Object implements com.aspose.ms.System.IDisposable, Closeable
Represents base abstraction for supported file format.
Modifier and Type | Method and Description |
---|---|
void |
cleanMetadata()
Removes or resets metadata.
|
void |
close() |
void |
dispose()
Performs application-defined tasks associated with freeing, releasing, or resetting unmanaged resources.
|
protected void |
dispose(boolean disposing)
Releases unmanaged and optionally managed resources.
|
Metadata[] |
getMetadata()
Gets array of
Metadata contained in file. |
String |
getMIMEType()
Gets MIME type.
|
abstract int |
getType()
Gets document type.
|
MetadataProperty |
readByMetadataKey(MetadataKey key) |
void |
save()
Commits all changes.
|
void |
save(OutputStream outputStream)
Stores file content into stream.
|
void |
save(String outputPath)
Stores file content to the specific path.
|
public abstract int getType()
Gets document type.
public final String getMIMEType()
Gets MIME type.
public void cleanMetadata()
Removes or resets metadata. In some cases metadata could not be deleted, just be reset to default state.
public final Metadata[] getMetadata()
Gets array of Metadata
contained in file.
Metadata
.public void save(OutputStream outputStream)
Stores file content into stream.
outputStream
- Output stream.com.aspose.ms.System.ArgumentNullException
- Output stream could not be null.public final void save(String outputPath)
Stores file content to the specific path.
outputPath
- Output path.com.aspose.ms.System.ArgumentNullException
- Output path could not be null.public final void save()
Commits all changes.
public final void dispose()
Performs application-defined tasks associated with freeing, releasing, or resetting unmanaged resources.
dispose
in interface com.aspose.ms.System.IDisposable
public MetadataProperty readByMetadataKey(MetadataKey key)
protected void dispose(boolean disposing)
Releases unmanaged and optionally managed resources.
disposing
- true
to release both managed and unmanaged resources;
false
to release only unmanaged resources.public final void close()
close
in interface Closeable
close
in interface AutoCloseable
Copyright © 2019. All rights reserved.