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 long count;
private final boolean releaseAfterTransfer; 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)} * Calls {@link #DefaultFileRegion(FileChannel, long, long, boolean)}
* with <code>true</code> as the last argument. * with <code>true</code> as the last argument.
@ -30,7 +23,13 @@ public class DefaultFileRegion implements FileRegion {
public DefaultFileRegion(FileChannel file, long position, long count) { public DefaultFileRegion(FileChannel file, long position, long count) {
this(file, position, count, true); 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 @Override
public long getPosition() { public long getPosition() {