FileStreamContainer

Inheritance: java.lang.Object, com.aspose.imaging.DisposableObject, com.aspose.imaging.StreamContainer

public final class FileStreamContainer extends StreamContainer

Helper for file stream processing.

Methods

MethodDescription
to_Stream(FileStreamContainer fileStreamContainer)Performs an explicit conversion from com.aspose.imaging.FileStreamContainer to System.IO.Stream.
to_FileStream(FileStreamContainer fileStreamContainer)Performs an explicit conversion from com.aspose.imaging.FileStreamContainer to System.IO.FileStream.
createFileStream(String fileLocation, boolean isTemporal)Creates a new file stream.
openFileStream(String fileLocation)Opens an existing file stream.
isTemporal()Gets or sets a value indicating whether stream is temporal.
setTemporal(boolean value)Sets a value indicating whether stream is temporal.
isCreated()Gets a value indicating whether stream was created explicitly.
getFilePath()Gets the file path.

to_Stream(FileStreamContainer fileStreamContainer)

public static System.IO.Stream to_Stream(FileStreamContainer fileStreamContainer)

Performs an explicit conversion from com.aspose.imaging.FileStreamContainer to System.IO.Stream.

Parameters:

ParameterTypeDescription
fileStreamContainerFileStreamContainerThe file stream container.

Returns: com.aspose.ms.System.IO.Stream - The result of the conversion.

to_FileStream(FileStreamContainer fileStreamContainer)

public static System.IO.FileStream to_FileStream(FileStreamContainer fileStreamContainer)

Performs an explicit conversion from com.aspose.imaging.FileStreamContainer to System.IO.FileStream.

Parameters:

ParameterTypeDescription
fileStreamContainerFileStreamContainerThe file stream container.

Returns: com.aspose.ms.System.IO.FileStream - The result of the conversion.

createFileStream(String fileLocation, boolean isTemporal)

public static FileStreamContainer createFileStream(String fileLocation, boolean isTemporal)

Creates a new file stream.

Parameters:

ParameterTypeDescription
fileLocationjava.lang.StringThe file location.
isTemporalbooleanIf set to true the file stream container is temporal.

Returns: FileStreamContainer - The file stream container.

openFileStream(String fileLocation)

public static FileStreamContainer openFileStream(String fileLocation)

Opens an existing file stream. If file stream does not exist the appropriate exception is thrown.

Parameters:

ParameterTypeDescription
fileLocationjava.lang.StringThe file location.

Returns: FileStreamContainer - The file stream container.

isTemporal()

public boolean isTemporal()

Gets or sets a value indicating whether stream is temporal.

Returns: boolean - true if stream is temporal; otherwise, false.

A temporal stream will remove itself when disposed. If the stream is memory based this property has no effect. The stream can be marked as temporal or persistent in case it was created explicitly otherwise the appropriate exception is thrown.

setTemporal(boolean value)

public void setTemporal(boolean value)

Sets a value indicating whether stream is temporal.

Parameters:

ParameterTypeDescription
valuebooleantrue if stream is temporal; otherwise, false.

A temporal stream will remove itself when disposed. If the stream is memory based this property has no effect. The stream can be marked as temporal or persistent in case it was created explicitly otherwise the appropriate exception is thrown. |

isCreated()

public boolean isCreated()

Gets a value indicating whether stream was created explicitly.

Returns: boolean - true if stream was created explicitly; otherwise, false.

getFilePath()

public String getFilePath()

Gets the file path.

Returns: java.lang.String - The file path.