Extracting UTF-16 encoded file from ZIP archive in Java -


What does the reader give me in the last section of the code but its just fake, where was I wrong?

  public static zero read EMPLE (file file, string targetfile) {// create zipfile input stream FileInputStream stream = new FileInputStream (file); Zip Intstream ZipFile = New ZIP Intestream (New Buffed InputTream (Stream)); // I is looking for a specific file / entry while (! ZipFile.getNextEntry (.) GetName () .multiple (targetfile)) {zipFile.getNextEntry (); } // The next API requires a reader / target file is a UTF-16 encoded text file InputStreamReader Reader = new inputstream reader (zip file, charset. Name ("UTF-16")); // I can not mean four buf [] = new char [1] of this printing; While (Reader. Read (Buffet, 0, 1)! = -1) {System.out.print (buf); }}  

I thought that where you were wrong, it was believed that the file was UTF-16 Encoded

Can you show some initial byte values ​​if you do not decode them?


Comments

Popular posts from this blog

oracle - The fastest way to check if some records in a database table? -

php - multilevel menu with multilevel array -

jQuery UI: Datepicker month format -