Author: bodewig Date: Wed Dec 7 15:02:45 2011 New Revision: 1211466 URL: http://svn.apache.org/viewvc?rev=1211466&view=rev Log: whitespace
Modified: commons/proper/compress/trunk/src/main/java/org/apache/commons/compress/archivers/tar/TarArchiveInputStream.java Modified: commons/proper/compress/trunk/src/main/java/org/apache/commons/compress/archivers/tar/TarArchiveInputStream.java URL: http://svn.apache.org/viewvc/commons/proper/compress/trunk/src/main/java/org/apache/commons/compress/archivers/tar/TarArchiveInputStream.java?rev=1211466&r1=1211465&r2=1211466&view=diff ============================================================================== --- commons/proper/compress/trunk/src/main/java/org/apache/commons/compress/archivers/tar/TarArchiveInputStream.java (original) +++ commons/proper/compress/trunk/src/main/java/org/apache/commons/compress/archivers/tar/TarArchiveInputStream.java Wed Dec 7 15:02:45 2011 @@ -287,46 +287,46 @@ public class TarArchiveInputStream exten Map<String, String> parsePaxHeaders(Reader br) throws IOException { Map<String, String> headers = new HashMap<String, String>(); // Format is "length keyword=value\n"; - while(true){ // get length - int ch; - int len = 0; - int read = 0; - while((ch = br.read()) != -1){ - read++; - if (ch == ' '){ // End of length string - // Get keyword - StringBuffer sb = new StringBuffer(); - while((ch = br.read()) != -1){ - read++; - if (ch == '='){ // end of keyword - String keyword = sb.toString(); - // Get rest of entry - char[] cbuf = new char[len-read]; - int got = br.read(cbuf); - if (got != len - read){ - throw new IOException("Failed to read " - + "Paxheader. Expected " - + (len - read) - + " chars, read " - + got); - } - // Drop trailing NL - String value = new String(cbuf, 0, - len - read - 1); - headers.put(keyword, value); - break; + while(true){ // get length + int ch; + int len = 0; + int read = 0; + while((ch = br.read()) != -1){ + read++; + if (ch == ' '){ // End of length string + // Get keyword + StringBuffer sb = new StringBuffer(); + while((ch = br.read()) != -1){ + read++; + if (ch == '='){ // end of keyword + String keyword = sb.toString(); + // Get rest of entry + char[] cbuf = new char[len-read]; + int got = br.read(cbuf); + if (got != len - read){ + throw new IOException("Failed to read " + + "Paxheader. Expected " + + (len - read) + + " chars, read " + + got); } - sb.append((char) ch); + // Drop trailing NL + String value = new String(cbuf, 0, + len - read - 1); + headers.put(keyword, value); + break; } - break; // Processed single header + sb.append((char) ch); } - len *= 10; - len += ch - '0'; - } - if (ch == -1){ // EOF - break; + break; // Processed single header } + len *= 10; + len += ch - '0'; } + if (ch == -1){ // EOF + break; + } + } return headers; }