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

authentication - Mongodb revoke acccess to connect test database -

r - Update two sets of radiobuttons reactively - shiny -

ios - Realm over CoreData should I use NSFetchedResultController or a Dictionary? -