Hello everyone! For some reason, this code is changing any '\n' characters from the input and replacing it with '\n\r' in the new outputed file. I reference a couple websites, and still haven't figured it out.. Anyone have an idea? Thanks a lot!
Socket connectionSocket = sData.accept();
InputStream inputStream = connectionSocket.getInputStream();
BufferedInputStream inputBufferedStream = new BufferedInputStream(inputStream);
FileOutputStream outputStream = new FileOutputStream("/home/greg/1");
byte[] buffer = new byte[1024];
long count = 0;
int n = 0;
while ((n = inputBufferedStream.read(buffer))>=0) {
outputStream.write(buffer, 0, n);
count += n;
}
outputStream.close();
}