public abstract class FormatBase extends Object implements com.aspose.ms.System.IDisposable, Closeable
Represents base abstraction for supported file format.
Modifier and Type | Field and Description |
---|---|
protected String |
filePath
Represents absolute path to the file.
|
protected com.aspose.ms.System.IO.Stream |
stream
Represents file stream.
|
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.
|
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.
|
protected String filePath
Represents absolute path to the file. Could be null.
protected com.aspose.ms.System.IO.Stream stream
Represents file stream.
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 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 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)
public final void close()
close
in interface Closeable
close
in interface AutoCloseable
Copyright © 2018. All rights reserved.