Simpler constructor form should appear first

This commit is contained in:
Trustin Lee 2011-10-22 21:51:38 -07:00
parent 114ddd9a62
commit b944531b5e

View File

@ -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() {