Reduced visibility of methods where possible.

This commit is contained in:
akwizgran
2011-10-06 17:53:31 +01:00
parent bb9f03f1e8
commit 8468b84c54

View File

@@ -94,23 +94,25 @@ abstract class FilePlugin implements BatchTransportPlugin {
}
}
protected String createFilename() {
private String createFilename() {
StringBuilder s = new StringBuilder(12);
for(int i = 0; i < 8; i++) s.append((char) ('a' + Math.random() * 26));
s.append(".dat");
return s.toString();
}
protected long getCapacity(String path) throws IOException {
private long getCapacity(String path) throws IOException {
return FileSystemUtils.freeSpaceKb(path) * 1024L;
}
protected void createReaderFromFile(final File f) {
// Package access for testing
void createReaderFromFile(final File f) {
if(!started) return;
executor.execute(new ReaderCreator(f));
}
protected boolean isPossibleConnectionFilename(String filename) {
// Package access for testing
boolean isPossibleConnectionFilename(String filename) {
return filename.toLowerCase().matches("[a-z]{8}\\.dat");
}