Class FileBackedOutputStream

java.lang.Object
java.io.OutputStream
com.google.common.io.FileBackedOutputStream
All Implemented Interfaces:
Closeable, Flushable, AutoCloseable

@Beta @Deprecated(since="2022-12-01") public final class FileBackedOutputStream extends OutputStream
Deprecated.
The Google Guava Core Libraries are deprecated and will not be part of the AEM SDK after April 2023
An OutputStream that starts buffering to a byte array, but switches to file buffering once the data reaches a configurable size.

This class is thread-safe.

Since:
1.0
  • Constructor Details

    • FileBackedOutputStream

      public FileBackedOutputStream(int fileThreshold)
      Deprecated.
      Creates a new instance that uses the given file threshold, and does not reset the data when the ByteSource returned by asByteSource() is finalized.
      Parameters:
      fileThreshold - the number of bytes before the stream should switch to buffering to a file
    • FileBackedOutputStream

      public FileBackedOutputStream(int fileThreshold, boolean resetOnFinalize)
      Deprecated.
      Creates a new instance that uses the given file threshold, and optionally resets the data when the ByteSource returned by asByteSource() is finalized.
      Parameters:
      fileThreshold - the number of bytes before the stream should switch to buffering to a file
      resetOnFinalize - if true, the reset() method will be called when the ByteSource returned by asByteSource() is finalized
  • Method Details