java - When i write file I got space in the end How I can change it? -


i tried read content , write file. code run on server when server on linux don't have problem. when run on windows string in end got space how can fix ?

  public static void readfile(inputstream inputstream, outputstream outputstream, boolean closein, boolean closeout) throws ioexception {     byte[] buffer = new byte[4096];     int read = 0;     try {         while ((read = inputstream.read(buffer)) != -1)             outputstream.write(buffer, 0, read);     } {         //close input , output     } } 


Comments

Popular posts from this blog

php - Wordpress website dashboard page or post editor content is not showing but front end data is showing properly -

javascript - Get parameter of GET request -

javascript - Twitter Bootstrap - how to add some more margin between tooltip popup and element -