File tree Expand file tree Collapse file tree 1 file changed +8
-5
lines changed
as2-lib/src/main/java/com/helger/as2lib/util/http Expand file tree Collapse file tree 1 file changed +8
-5
lines changed Original file line number Diff line number Diff line change @@ -219,12 +219,15 @@ public boolean isStreaming ()
219
219
public void writeTo (@ Nonnull final OutputStream aOS ) throws IOException
220
220
{
221
221
// Use MIME encoding here
222
- try (final OutputStream aDebugOS = aOutgoingDumper != null ? aOutgoingDumper .getDumpOS (aOS ) : aOS ;
223
- final OutputStream aEncodedOS = eCTE != null ? AS2IOHelper .getContentTransferEncodingAwareOutputStream (aDebugOS ,
224
- eCTE .getID ())
225
- : aDebugOS )
222
+ try (final OutputStream aDebugOS = aOutgoingDumper != null ? aOutgoingDumper .getDumpOS (aOS ) : aOS )
226
223
{
227
- StreamHelper .copyByteStream ().from (aCIS ).closeFrom (true ).to (aEncodedOS ).closeTo (false ).build ();
224
+ try (
225
+ final OutputStream aEncodedOS = eCTE != null ? AS2IOHelper .getContentTransferEncodingAwareOutputStream (aDebugOS ,
226
+ eCTE .getID ())
227
+ : aDebugOS )
228
+ {
229
+ StreamHelper .copyByteStream ().from (aCIS ).closeFrom (true ).to (aEncodedOS ).closeTo (false ).build ();
230
+ }
228
231
}
229
232
catch (final MessagingException ex )
230
233
{
You can’t perform that action at this time.
0 commit comments