File tree Expand file tree Collapse file tree
src/main/java/org/apache/commons/io/input Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -122,7 +122,7 @@ public Builder() {
122122 */
123123 @ Override
124124 public MemoryMappedFileInputStream get () throws IOException {
125- return new MemoryMappedFileInputStream (getPath (), getBufferSize () );
125+ return new MemoryMappedFileInputStream (this );
126126 }
127127 }
128128
@@ -156,13 +156,12 @@ public static Builder builder() {
156156 /**
157157 * Constructs a new instance.
158158 *
159- * @param file The path of the file to open.
160- * @param bufferSize Size of the sliding buffer.
159+ * @param builder The builder.
161160 * @throws IOException If an I/O error occurs.
162161 */
163- private MemoryMappedFileInputStream (final Path file , final int bufferSize ) throws IOException {
164- this .bufferSize = bufferSize ;
165- this .channel = FileChannel .open (file , StandardOpenOption .READ );
162+ private MemoryMappedFileInputStream (final Builder builder ) throws IOException {
163+ this .bufferSize = builder . getBufferSize () ;
164+ this .channel = FileChannel .open (builder . getPath () , StandardOpenOption .READ );
166165 }
167166
168167 @ Override
You can’t perform that action at this time.
0 commit comments