File tree Expand file tree Collapse file tree 1 file changed +13
-1
lines changed
io/src/main/java/com/itextpdf/io/source Expand file tree Collapse file tree 1 file changed +13
-1
lines changed Original file line number Diff line number Diff line change @@ -60,11 +60,15 @@ This file is part of the iText (R) project.
60
60
*/
61
61
public final class RandomAccessSourceFactory {
62
62
63
+ /**
64
+ * The default value for the forceRead flag
65
+ */
66
+ private static boolean forceReadDefaultValue = false ;
63
67
64
68
/**
65
69
* Whether the full content of the source should be read into memory at construction
66
70
*/
67
- private boolean forceRead = false ;
71
+ private boolean forceRead = forceReadDefaultValue ;
68
72
69
73
/**
70
74
* Whether {@link java.io.RandomAccessFile} should be used instead of a {@link java.nio.channels.FileChannel}, where applicable
@@ -82,6 +86,14 @@ public final class RandomAccessSourceFactory {
82
86
public RandomAccessSourceFactory () {
83
87
}
84
88
89
+ /**
90
+ * Determines the default value for the forceRead flag
91
+ * @param forceRead true if by default the full content will be read, false otherwise
92
+ */
93
+ public static void setForceReadDefaultValue (boolean forceRead ) {
94
+ forceReadDefaultValue = forceRead ;
95
+ }
96
+
85
97
/**
86
98
* Determines whether the full content of the source will be read into memory
87
99
* @param forceRead true if the full content will be read, false otherwise
You can’t perform that action at this time.
0 commit comments