The EncryptContentPGP Processor reads the initial bytes of incoming files to determine whether a file is an OpenPGP message. This initial read is necessary to support flows with SignContentPGP creating signed OpenPGP messages prior to encryption.
The current implementation uses an InputStreamCallback with ProcessSession.read() to run content type detection. Instead a separate read callback, the StreamCallback for ProcessSession.write() can be modified to use a buffer with PushbackInputStream. This will avoid reading the initial bytes multiple times.