Does it make a difference if you choose a non-standard indent style?
This is the style I see most often:
import java.io.FileInputStream;
import java.io.FileOutputStream;
import java.nio.ByteBuffer;
import java.nio.channels.FileChannel;
public class Test {
static public void main(String args[]) throws Exception {
FileInputStream fin = new FileInputStream("infile.txt");
FileOutputStream fout = new FileOutputStream("outfile.txt");
FileChannel inc = fin.getChannel();
FileChannel outc = fout.getChannel();
ByteBuffer bb = ByteBuffer.allocateDirect(1024);
while (true) {
int ret = inc.read(bb);
if (ret == -1)
break;
bb.flip();
outc.write(bb);
bb.clear();
}
}
}
But I prefer this style where everything starts on the next line:
import java.io.FileInputStream;
import java.io.FileOutputStream;
import java.nio.ByteBuffer;
import java.nio.channels.FileChannel;
public class Test
{
static public void main(String args[]) throws Exception
{
FileInputStream fin = new FileInputStream("infile.txt");
FileOutputStream fout = new FileOutputStream("outfile.txt");
FileChannel inc = fin.getChannel();
FileChannel outc = fout.getChannel();
ByteBuffer bb = ByteBuffer.allocateDirect(1024);
while (true)
{
int ret = inc.read(bb);
if (ret == -1)
break;
bb.flip();
outc.write(bb);
bb.clear();
}
}
}
I find this easier to read but will I encounter problems working with others if I use this style?