Simpler constructor form should appear first
This commit is contained in:
parent
114ddd9a62
commit
b944531b5e
@ -16,13 +16,6 @@ public class DefaultFileRegion implements FileRegion {
|
||||
private final long count;
|
||||
private final boolean releaseAfterTransfer;
|
||||
|
||||
public DefaultFileRegion(FileChannel file, long position, long count, boolean releaseAfterTransfer) {
|
||||
this.file = file;
|
||||
this.position = position;
|
||||
this.count = count;
|
||||
this.releaseAfterTransfer = releaseAfterTransfer;
|
||||
}
|
||||
|
||||
/**
|
||||
* Calls {@link #DefaultFileRegion(FileChannel, long, long, boolean)}
|
||||
* with <code>true</code> as the last argument.
|
||||
@ -31,6 +24,12 @@ public class DefaultFileRegion implements FileRegion {
|
||||
this(file, position, count, true);
|
||||
}
|
||||
|
||||
public DefaultFileRegion(FileChannel file, long position, long count, boolean releaseAfterTransfer) {
|
||||
this.file = file;
|
||||
this.position = position;
|
||||
this.count = count;
|
||||
this.releaseAfterTransfer = releaseAfterTransfer;
|
||||
}
|
||||
|
||||
@Override
|
||||
public long getPosition() {
|
||||
|
Loading…
Reference in New Issue
Block a user