File tree Expand file tree Collapse file tree 2 files changed +27
-5
lines changed
io/src/main/java/com/itextpdf/io/source
kernel/src/main/java/com/itextpdf/kernel/pdf Expand file tree Collapse file tree 2 files changed +27
-5
lines changed Original file line number Diff line number Diff line change @@ -46,7 +46,11 @@ This file is part of the iText (R) project.
46
46
47
47
import com .itextpdf .io .IOException ;
48
48
49
- public class OutputStream <T extends java .io .OutputStream > extends java .io .OutputStream {
49
+ import java .io .Serializable ;
50
+
51
+ public class OutputStream <T extends java .io .OutputStream > extends java .io .OutputStream implements Serializable {
52
+
53
+ private static final long serialVersionUID = -5337390096148526418L ;
50
54
51
55
//long=19 + max frac=6 => 26 => round to 32.
52
56
private final ByteBuffer numBuffer = new ByteBuffer (32 );
@@ -233,4 +237,22 @@ public void reset() {
233
237
} else
234
238
throw new IOException (IOException .BytesCanBeResetInByteArrayOutputStreamOnly );
235
239
}
240
+
241
+ /**
242
+ * This method is invoked while deserialization
243
+ */
244
+ private void readObject (java .io .ObjectInputStream in ) throws java .io .IOException , ClassNotFoundException {
245
+ in .defaultReadObject ();
246
+ }
247
+
248
+ /**
249
+ * This method is invoked while serialization
250
+ */
251
+ private void writeObject (java .io .ObjectOutputStream out ) throws java .io .IOException {
252
+ java .io .OutputStream tempOutputStream = outputStream ;
253
+ outputStream = null ;
254
+ out .defaultWriteObject ();
255
+ outputStream = tempOutputStream ;
256
+ }
257
+
236
258
}
Original file line number Diff line number Diff line change @@ -52,15 +52,15 @@ This file is part of the iText (R) project.
52
52
import com .itextpdf .kernel .PdfException ;
53
53
import com .itextpdf .kernel .crypto .OutputStreamEncryption ;
54
54
import com .itextpdf .kernel .pdf .filters .FlateDecodeFilter ;
55
- import org .slf4j .Logger ;
56
- import org .slf4j .LoggerFactory ;
57
55
58
56
import java .io .IOException ;
59
- import java .io .Serializable ;
60
57
import java .text .MessageFormat ;
61
58
import java .util .Map ;
62
59
63
- public class PdfOutputStream extends OutputStream <PdfOutputStream > implements Serializable {
60
+ import org .slf4j .Logger ;
61
+ import org .slf4j .LoggerFactory ;
62
+
63
+ public class PdfOutputStream extends OutputStream <PdfOutputStream > {
64
64
65
65
private static final long serialVersionUID = -548180479472231600L ;
66
66
You can’t perform that action at this time.
0 commit comments