Mercurial > hg4j
comparison src/com/tmate/hgkit/fs/DataAccessProvider.java @ 27:b0a15cefdfd6
Cons args instead of fixed consts
| author | Artem Tikhomirov <tikhomirov.artem@gmail.com> |
|---|---|
| date | Sun, 09 Jan 2011 16:02:26 +0100 |
| parents | 71a9ba42cee8 |
| children | 9429c7bd1920 |
comparison
equal
deleted
inserted
replaced
| 26:71a9ba42cee8 | 27:b0a15cefdfd6 |
|---|---|
| 18 | 18 |
| 19 private final int mapioMagicBoundary; | 19 private final int mapioMagicBoundary; |
| 20 private final int bufferSize; | 20 private final int bufferSize; |
| 21 | 21 |
| 22 public DataAccessProvider() { | 22 public DataAccessProvider() { |
| 23 mapioMagicBoundary = 100 * 1024; | 23 this(100 * 1024, 8 * 1024); |
| 24 bufferSize = 8 * 1024; | 24 } |
| 25 | |
| 26 public DataAccessProvider(int mapioBoundary, int regularBufferSize) { | |
| 27 mapioMagicBoundary = mapioBoundary; | |
| 28 bufferSize = regularBufferSize; | |
| 25 } | 29 } |
| 26 | 30 |
| 27 public DataAccess create(File f) { | 31 public DataAccess create(File f) { |
| 28 if (!f.exists()) { | 32 if (!f.exists()) { |
| 29 return new DataAccess(); | 33 return new DataAccess(); |
