Code view:

A painting is a person's account of this edit as text, recorded independently of the node mapping - a rendering often has several equally defensible answers where the mapping has one. Deletions and insertions carry no position on the opposite side in a painting, so that panel draws no caret for them.

Before

…lines 1–895 unchanged (895 lines)
896 */
897 public int read() throws IOException {
898 return getCurrentStream().read();
899 }
900
901 private InputStream getCurrentStream() throws IOException {
902 if (deferredBlockStreams.isEmpty()) {
903 throw new IllegalStateException("No current 7z entry (call getNextEntry() first).");
904 }
905
906 while (deferredBlockStreams.size() > 1) {
907 // In solid compression mode we need to decompress all leading folder'
908 // streams to get access to an entry. We defer this until really needed
…lines 909–1012 unchanged (104 lines)

After

…lines 1–895 unchanged (895 lines)
896 */
897 public int read() throws IOException {
898 return getCurrentStream().read();
899 }
900
901 private InputStream getCurrentStream() throws IOException {
902 if (archive.files[currentEntryIndex].getSize() == 0) {
903 return new ByteArrayInputStream(new byte[0]);
904 }
905 if (deferredBlockStreams.isEmpty()) {
906 throw new IllegalStateException("No current 7z entry (call getNextEntry() first).");
907 }
908
909 while (deferredBlockStreams.size() > 1) {
910 // In solid compression mode we need to decompress all leading folder'
…lines 911–1015 unchanged (105 lines)

Before

program
block_comment "/*\n * Licensed to the Apache Software Foundation (ASF) unde"...
package_declaration
package "package"
scoped_identifier
scoped_identifier
scoped_identifier
scoped_identifier
scoped_identifier
identifier "org"
. "."
identifier "apache"
. "."
identifier "commons"
. "."
identifier "compress"
. "."
identifier "archivers"
. "."
identifier "sevenz"
; ";"
import_declaration
import "import"
scoped_identifier
scoped_identifier
identifier "java"
. "."
identifier "io"
. "."
identifier "BufferedInputStream"
; ";"
import_declaration
import "import"
scoped_identifier
scoped_identifier
identifier "java"
. "."
identifier "io"
. "."
identifier "ByteArrayInputStream"
; ";"
import_declaration
import "import"
scoped_identifier
scoped_identifier
identifier "java"
. "."
identifier "io"
. "."
identifier "Closeable"
; ";"
import_declaration
import "import"
scoped_identifier
scoped_identifier
identifier "java"
. "."
identifier "io"
. "."
identifier "DataInput"
; ";"
import_declaration
import "import"
scoped_identifier
scoped_identifier
identifier "java"
. "."
identifier "io"
. "."
identifier "DataInputStream"
; ";"
import_declaration
import "import"
scoped_identifier
scoped_identifier
identifier "java"
. "."
identifier "io"
. "."
identifier "File"
; ";"
import_declaration
import "import"
scoped_identifier
scoped_identifier
identifier "java"
. "."
identifier "io"
. "."
identifier "IOException"
; ";"
import_declaration
import "import"
scoped_identifier
scoped_identifier
identifier "java"
. "."
identifier "io"
. "."
identifier "InputStream"
; ";"
import_declaration
import "import"
scoped_identifier
scoped_identifier
identifier "java"
. "."
identifier "io"
. "."
identifier "RandomAccessFile"
; ";"
import_declaration
import "import"
scoped_identifier
scoped_identifier
identifier "java"
. "."
identifier "util"
. "."
identifier "ArrayList"
; ";"
import_declaration
import "import"
scoped_identifier
scoped_identifier
identifier "java"
. "."
identifier "util"
. "."
identifier "Arrays"
; ";"
import_declaration
import "import"
scoped_identifier
scoped_identifier
identifier "java"
. "."
identifier "util"
. "."
identifier "BitSet"
; ";"
import_declaration
import "import"
scoped_identifier
scoped_identifier
identifier "java"
. "."
identifier "util"
. "."
identifier "LinkedList"
; ";"
import_declaration
import "import"
scoped_identifier
scoped_identifier
scoped_identifier
identifier "java"
. "."
identifier "util"
. "."
identifier "zip"
. "."
identifier "CRC32"
; ";"
import_declaration
import "import"
scoped_identifier
scoped_identifier
scoped_identifier
scoped_identifier
scoped_identifier
identifier "org"
. "."
identifier "apache"
. "."
identifier "commons"
. "."
identifier "compress"
. "."
identifier "utils"
. "."
identifier "BoundedInputStream"
; ";"
import_declaration
import "import"
scoped_identifier
scoped_identifier
scoped_identifier
scoped_identifier
scoped_identifier
identifier "org"
. "."
identifier "apache"
. "."
identifier "commons"
. "."
identifier "compress"
. "."
identifier "utils"
. "."
identifier "CRC32VerifyingInputStream"
; ";"
import_declaration
import "import"
scoped_identifier
scoped_identifier
scoped_identifier
scoped_identifier
scoped_identifier
identifier "org"
. "."
identifier "apache"
. "."
identifier "commons"
. "."
identifier "compress"
. "."
identifier "utils"
. "."
identifier "CharsetNames"
; ";"
import_declaration
import "import"
scoped_identifier
scoped_identifier
scoped_identifier
scoped_identifier
scoped_identifier
identifier "org"
. "."
identifier "apache"
. "."
identifier "commons"
. "."
identifier "compress"
. "."
identifier "utils"
. "."
identifier "IOUtils"
; ";"
block_comment "/**\n * Reads a 7z file, using RandomAccessFile under\n * the "...
class_declaration
modifiers
public "public"
class "class"
identifier "SevenZFile"
super_interfaces
implements "implements"
type_list
type_identifier "Closeable"
class_body
{ "{"
field_declaration
modifiers
static "static"
final "final"
integral_type
int "int"
variable_declarator
identifier "SIGNATURE_HEADER_SIZE"
= "="
decimal_integer_literal "32"
; ";"
field_declaration
modifiers
private "private"
final "final"
type_identifier "String"
variable_declarator
identifier "fileName"
; ";"
field_declaration
modifiers
private "private"
type_identifier "RandomAccessFile"
variable_declarator
identifier "file"
; ";"
field_declaration
modifiers
private "private"
final "final"
type_identifier "Archive"
variable_declarator
identifier "archive"
; ";"
field_declaration
modifiers
private "private"
integral_type
int "int"
variable_declarator
identifier "currentEntryIndex"
= "="
unary_expression
- "-"
decimal_integer_literal "1"
; ";"
field_declaration
modifiers
private "private"
integral_type
int "int"
variable_declarator
identifier "currentFolderIndex"
= "="
unary_expression
- "-"
decimal_integer_literal "1"
; ";"
field_declaration
modifiers
private "private"
type_identifier "InputStream"
variable_declarator
identifier "currentFolderInputStream"
= "="
null_literal "null"
; ";"
field_declaration
modifiers
private "private"
array_type
integral_type
byte "byte"
dimensions
[ "["
] "]"
variable_declarator
identifier "password"
; ";"
field_declaration (+25 nodes collapsed)
field_declaration (+58 nodes collapsed)
block_comment "/**\n * Reads a file as 7z archive\n *\n * @param f"...
constructor_declaration (+189 nodes collapsed)
block_comment "/**\n * Reads a file as unencrypted 7z archive\n *\n "...
constructor_declaration (+27 nodes collapsed)
block_comment "/**\n * Closes the archive.\n * @throws IOException if"...
method_declaration (+89 nodes collapsed)
block_comment "/**\n * Returns the next Archive Entry in this archive.\n "...
method_declaration (+71 nodes collapsed)
block_comment "/**\n * Returns meta-data of all archive entries.\n *\n"...
method_declaration (+30 nodes collapsed)
method_declaration (+517 nodes collapsed)
method_declaration (+175 nodes collapsed)
method_declaration (+208 nodes collapsed)
method_declaration (+112 nodes collapsed)
method_declaration (+337 nodes collapsed)
method_declaration (+198 nodes collapsed)
method_declaration (+345 nodes collapsed)
method_declaration (+517 nodes collapsed)
method_declaration (+794 nodes collapsed)
method_declaration (+848 nodes collapsed)
method_declaration (+129 nodes collapsed)
method_declaration (+141 nodes collapsed)
method_declaration (+1724 nodes collapsed)
method_declaration (+560 nodes collapsed)
method_declaration (+322 nodes collapsed)
method_declaration (+287 nodes collapsed)
block_comment "/**\n * Reads a byte of data.\n * \n * @return the "...
method_declaration (+29 nodes collapsed)
method_declaration
modifiers
private "private"
type_identifier "InputStream"
identifier "getCurrentStream"
formal_parameters
( "("
) ")"
throws
throws "throws"
type_identifier "IOException"
block
{ "{"
if_statement (+28 nodes collapsed)
while_statement (+61 nodes collapsed)
return_statement
return "return"
method_invocation
identifier "deferredBlockStreams"
. "."
identifier "get"
argument_list
( "("
decimal_integer_literal "0"
) ")"
; ";"
} "}"
block_comment "/**\n * Reads data into an array of bytes.\n * \n *"...
method_declaration (+41 nodes collapsed)
block_comment "/**\n * Reads data into an array of bytes.\n * \n *"...
method_declaration (+58 nodes collapsed)
method_declaration (+167 nodes collapsed)
block_comment "/**\n * Checks if the signature matches what is expected "...
method_declaration (+102 nodes collapsed)
method_declaration (+179 nodes collapsed)
method_declaration (+24 nodes collapsed)
} "}"

After

program
block_comment "/*\n * Licensed to the Apache Software Foundation (ASF) unde"...
package_declaration
package "package"
scoped_identifier
scoped_identifier
scoped_identifier
scoped_identifier
scoped_identifier
identifier "org"
. "."
identifier "apache"
. "."
identifier "commons"
. "."
identifier "compress"
. "."
identifier "archivers"
. "."
identifier "sevenz"
; ";"
import_declaration
import "import"
scoped_identifier
scoped_identifier
identifier "java"
. "."
identifier "io"
. "."
identifier "BufferedInputStream"
; ";"
import_declaration
import "import"
scoped_identifier
scoped_identifier
identifier "java"
. "."
identifier "io"
. "."
identifier "ByteArrayInputStream"
; ";"
import_declaration
import "import"
scoped_identifier
scoped_identifier
identifier "java"
. "."
identifier "io"
. "."
identifier "Closeable"
; ";"
import_declaration
import "import"
scoped_identifier
scoped_identifier
identifier "java"
. "."
identifier "io"
. "."
identifier "DataInput"
; ";"
import_declaration
import "import"
scoped_identifier
scoped_identifier
identifier "java"
. "."
identifier "io"
. "."
identifier "DataInputStream"
; ";"
import_declaration
import "import"
scoped_identifier
scoped_identifier
identifier "java"
. "."
identifier "io"
. "."
identifier "File"
; ";"
import_declaration
import "import"
scoped_identifier
scoped_identifier
identifier "java"
. "."
identifier "io"
. "."
identifier "IOException"
; ";"
import_declaration
import "import"
scoped_identifier
scoped_identifier
identifier "java"
. "."
identifier "io"
. "."
identifier "InputStream"
; ";"
import_declaration
import "import"
scoped_identifier
scoped_identifier
identifier "java"
. "."
identifier "io"
. "."
identifier "RandomAccessFile"
; ";"
import_declaration
import "import"
scoped_identifier
scoped_identifier
identifier "java"
. "."
identifier "util"
. "."
identifier "ArrayList"
; ";"
import_declaration
import "import"
scoped_identifier
scoped_identifier
identifier "java"
. "."
identifier "util"
. "."
identifier "Arrays"
; ";"
import_declaration
import "import"
scoped_identifier
scoped_identifier
identifier "java"
. "."
identifier "util"
. "."
identifier "BitSet"
; ";"
import_declaration
import "import"
scoped_identifier
scoped_identifier
identifier "java"
. "."
identifier "util"
. "."
identifier "LinkedList"
; ";"
import_declaration
import "import"
scoped_identifier
scoped_identifier
scoped_identifier
identifier "java"
. "."
identifier "util"
. "."
identifier "zip"
. "."
identifier "CRC32"
; ";"
import_declaration
import "import"
scoped_identifier
scoped_identifier
scoped_identifier
scoped_identifier
scoped_identifier
identifier "org"
. "."
identifier "apache"
. "."
identifier "commons"
. "."
identifier "compress"
. "."
identifier "utils"
. "."
identifier "BoundedInputStream"
; ";"
import_declaration
import "import"
scoped_identifier
scoped_identifier
scoped_identifier
scoped_identifier
scoped_identifier
identifier "org"
. "."
identifier "apache"
. "."
identifier "commons"
. "."
identifier "compress"
. "."
identifier "utils"
. "."
identifier "CRC32VerifyingInputStream"
; ";"
import_declaration
import "import"
scoped_identifier
scoped_identifier
scoped_identifier
scoped_identifier
scoped_identifier
identifier "org"
. "."
identifier "apache"
. "."
identifier "commons"
. "."
identifier "compress"
. "."
identifier "utils"
. "."
identifier "CharsetNames"
; ";"
import_declaration
import "import"
scoped_identifier
scoped_identifier
scoped_identifier
scoped_identifier
scoped_identifier
identifier "org"
. "."
identifier "apache"
. "."
identifier "commons"
. "."
identifier "compress"
. "."
identifier "utils"
. "."
identifier "IOUtils"
; ";"
block_comment "/**\n * Reads a 7z file, using RandomAccessFile under\n * the "...
class_declaration
modifiers
public "public"
class "class"
identifier "SevenZFile"
super_interfaces
implements "implements"
type_list
type_identifier "Closeable"
class_body
{ "{"
field_declaration
modifiers
static "static"
final "final"
integral_type
int "int"
variable_declarator
identifier "SIGNATURE_HEADER_SIZE"
= "="
decimal_integer_literal "32"
; ";"
field_declaration
modifiers
private "private"
final "final"
type_identifier "String"
variable_declarator
identifier "fileName"
; ";"
field_declaration
modifiers
private "private"
type_identifier "RandomAccessFile"
variable_declarator
identifier "file"
; ";"
field_declaration
modifiers
private "private"
final "final"
type_identifier "Archive"
variable_declarator
identifier "archive"
; ";"
field_declaration
modifiers
private "private"
integral_type
int "int"
variable_declarator
identifier "currentEntryIndex"
= "="
unary_expression
- "-"
decimal_integer_literal "1"
; ";"
field_declaration
modifiers
private "private"
integral_type
int "int"
variable_declarator
identifier "currentFolderIndex"
= "="
unary_expression
- "-"
decimal_integer_literal "1"
; ";"
field_declaration
modifiers
private "private"
type_identifier "InputStream"
variable_declarator
identifier "currentFolderInputStream"
= "="
null_literal "null"
; ";"
field_declaration
modifiers
private "private"
array_type
integral_type
byte "byte"
dimensions
[ "["
] "]"
variable_declarator
identifier "password"
; ";"
field_declaration (+25 nodes collapsed)
field_declaration (+58 nodes collapsed)
block_comment "/**\n * Reads a file as 7z archive\n *\n * @param f"...
constructor_declaration (+189 nodes collapsed)
block_comment "/**\n * Reads a file as unencrypted 7z archive\n *\n "...
constructor_declaration (+27 nodes collapsed)
block_comment "/**\n * Closes the archive.\n * @throws IOException if"...
method_declaration (+89 nodes collapsed)
block_comment "/**\n * Returns the next Archive Entry in this archive.\n "...
method_declaration (+71 nodes collapsed)
block_comment "/**\n * Returns meta-data of all archive entries.\n *\n"...
method_declaration (+30 nodes collapsed)
method_declaration (+517 nodes collapsed)
method_declaration (+175 nodes collapsed)
method_declaration (+208 nodes collapsed)
method_declaration (+112 nodes collapsed)
method_declaration (+337 nodes collapsed)
method_declaration (+198 nodes collapsed)
method_declaration (+345 nodes collapsed)
method_declaration (+517 nodes collapsed)
method_declaration (+794 nodes collapsed)
method_declaration (+848 nodes collapsed)
method_declaration (+129 nodes collapsed)
method_declaration (+141 nodes collapsed)
method_declaration (+1724 nodes collapsed)
method_declaration (+560 nodes collapsed)
method_declaration (+322 nodes collapsed)
method_declaration (+287 nodes collapsed)
block_comment "/**\n * Reads a byte of data.\n * \n * @return the "...
method_declaration (+29 nodes collapsed)
method_declaration
modifiers
private "private"
type_identifier "InputStream"
identifier "getCurrentStream"
formal_parameters
( "("
) ")"
throws
throws "throws"
type_identifier "IOException"
block
{ "{"
if_statement
if "if"
parenthesized_expression
( "("
binary_expression
method_invocation
array_access
field_access
identifier "archive"
. "."
identifier "files"
[ "["
identifier "currentEntryIndex"
] "]"
. "."
identifier "getSize"
argument_list
( "("
) ")"
== "=="
decimal_integer_literal "0"
) ")"
block
{ "{"
return_statement
return "return"
object_creation_expression
new "new"
type_identifier "ByteArrayInputStream"
argument_list
( "("
array_creation_expression
new "new"
integral_type
byte "byte"
dimensions_expr
[ "["
decimal_integer_literal "0"
] "]"
) ")"
; ";"
} "}"
if_statement (+28 nodes collapsed)
while_statement (+61 nodes collapsed)
return_statement
return "return"
method_invocation
identifier "deferredBlockStreams"
. "."
identifier "get"
argument_list
( "("
decimal_integer_literal "0"
) ")"
; ";"
} "}"
block_comment "/**\n * Reads data into an array of bytes.\n * \n *"...
method_declaration (+41 nodes collapsed)
block_comment "/**\n * Reads data into an array of bytes.\n * \n *"...
method_declaration (+58 nodes collapsed)
method_declaration (+167 nodes collapsed)
block_comment "/**\n * Checks if the signature matches what is expected "...
method_declaration (+102 nodes collapsed)
method_declaration (+179 nodes collapsed)
method_declaration (+24 nodes collapsed)
} "}"