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–90 unchanged (90 lines)
91 /**
92 * The encoding to use for filenames and labels.
93 */
94 private final ZipEncoding zipEncoding;
95
96 // the provided encoding (for unit tests)
97
98 /**
99 * Construct the cpio input stream with a blocksize of {@link
100 * CpioConstants#BLOCK_SIZE BLOCK_SIZE} and expecting ASCII file
101 * names.
102 *
103 * @param in
…lines 104–148 unchanged (45 lines)
149 * the platform's default.
150 * @since 1.6
151 */
152 public CpioArchiveInputStream(final InputStream in, int blockSize, String encoding) {
153 this.in = in;
154 this.blockSize = blockSize;
155 this.zipEncoding = ZipEncodingHelper.getZipEncoding(encoding);
156 }
157
158 /**
159 * Returns 0 after EOF has reached for the current entry data, otherwise
160 * always return 1.
161 * <p>
…lines 162–565 unchanged (404 lines)

After

…lines 1–90 unchanged (90 lines)
91 /**
92 * The encoding to use for filenames and labels.
93 */
94 private final ZipEncoding zipEncoding;
95
96 // the provided encoding (for unit tests)
97 final String encoding;
98
99 /**
100 * Construct the cpio input stream with a blocksize of {@link
101 * CpioConstants#BLOCK_SIZE BLOCK_SIZE} and expecting ASCII file
102 * names.
103 *
…lines 104–149 unchanged (46 lines)
150 * the platform's default.
151 * @since 1.6
152 */
153 public CpioArchiveInputStream(final InputStream in, int blockSize, String encoding) {
154 this.in = in;
155 this.blockSize = blockSize;
156 this.encoding = encoding;
157 this.zipEncoding = ZipEncodingHelper.getZipEncoding(encoding);
158 }
159
160 /**
161 * Returns 0 after EOF has reached for the current entry data, otherwise
162 * always return 1.
…lines 163–567 unchanged (405 lines)

Before

program
block_comment "/*\n * Licensed to the Apache Software Foundation (ASF) under"...
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 "cpio"
; ";"
import_declaration
import "import"
scoped_identifier
scoped_identifier
identifier "java"
. "."
identifier "io"
. "."
identifier "EOFException"
; ";"
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
scoped_identifier
scoped_identifier
scoped_identifier
identifier "org"
. "."
identifier "apache"
. "."
identifier "commons"
. "."
identifier "compress"
. "."
identifier "archivers"
. "."
identifier "ArchiveEntry"
; ";"
import_declaration
import "import"
scoped_identifier
scoped_identifier
scoped_identifier
scoped_identifier
scoped_identifier
identifier "org"
. "."
identifier "apache"
. "."
identifier "commons"
. "."
identifier "compress"
. "."
identifier "archivers"
. "."
identifier "ArchiveInputStream"
; ";"
import_declaration (+22 nodes collapsed)
import_declaration (+22 nodes collapsed)
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 "ArchiveUtils"
; ";"
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 * CPIOArchiveInputStream is a stream for reading cpio s"...
class_declaration
modifiers
public "public"
class "class"
identifier "CpioArchiveInputStream"
superclass
extends "extends"
type_identifier "ArchiveInputStream"
super_interfaces
implements "implements"
type_list
type_identifier "CpioConstants"
class_body
{ "{"
field_declaration
modifiers
private "private"
boolean_type "boolean"
variable_declarator
identifier "closed"
= "="
false "false"
; ";"
field_declaration
modifiers
private "private"
type_identifier "CpioArchiveEntry"
variable_declarator
identifier "entry"
; ";"
field_declaration
modifiers
private "private"
integral_type
long "long"
variable_declarator
identifier "entryBytesRead"
= "="
decimal_integer_literal "0"
; ";"
field_declaration
modifiers
private "private"
boolean_type "boolean"
variable_declarator
identifier "entryEOF"
= "="
false "false"
; ";"
field_declaration (+21 nodes collapsed)
field_declaration
modifiers
private "private"
integral_type
long "long"
variable_declarator
identifier "crc"
= "="
decimal_integer_literal "0"
; ";"
field_declaration
modifiers
private "private"
final "final"
type_identifier "InputStream"
variable_declarator
identifier "in"
; ";"
line_comment "// cached buffers - must only be used locally in the class ("...
field_declaration (+22 nodes collapsed)
field_declaration (+22 nodes collapsed)
field_declaration (+22 nodes collapsed)
field_declaration
modifiers
private "private"
final "final"
integral_type
int "int"
variable_declarator
identifier "blockSize"
; ";"
block_comment "/**\n * The encoding to use for filenames and labels.\n "...
field_declaration
modifiers
private "private"
final "final"
type_identifier "ZipEncoding"
variable_declarator
identifier "zipEncoding"
; ";"
line_comment "// the provided encoding (for unit tests)"
block_comment "/**\n * Construct the cpio input stream with a blocksize "...
constructor_declaration (+29 nodes collapsed)
block_comment "/**\n * Construct the cpio input stream with a blocksize "...
constructor_declaration (+30 nodes collapsed)
block_comment "/**\n * Construct the cpio input stream with a blocksize "...
constructor_declaration (+34 nodes collapsed)
block_comment "/**\n * Construct the cpio input stream with a blocksize "...
constructor_declaration
modifiers
public "public"
identifier "CpioArchiveInputStream"
formal_parameters
( "("
formal_parameter
modifiers
final "final"
type_identifier "InputStream"
identifier "in"
, ","
formal_parameter
integral_type
int "int"
identifier "blockSize"
, ","
formal_parameter
type_identifier "String"
identifier "encoding"
) ")"
constructor_body
{ "{"
expression_statement
assignment_expression
field_access
this "this"
. "."
identifier "in"
= "="
identifier "in"
; ";"
expression_statement
assignment_expression
field_access
this "this"
. "."
identifier "blockSize"
= "="
identifier "blockSize"
; ";"
expression_statement
assignment_expression
field_access
this "this"
. "."
identifier "zipEncoding"
= "="
method_invocation
identifier "ZipEncodingHelper"
. "."
identifier "getZipEncoding"
argument_list
( "("
identifier "encoding"
) ")"
; ";"
} "}"
block_comment "/**\n * Returns 0 after EOF has reached for the current e"...
method_declaration (+45 nodes collapsed)
block_comment "/**\n * Closes the CPIO input stream.\n * \n * @thr"...
method_declaration (+49 nodes collapsed)
block_comment "/**\n * Closes the current CPIO entry and positions the s"...
method_declaration (+46 nodes collapsed)
block_comment "/**\n * Check to make sure that this stream has not been "...
method_declaration (+39 nodes collapsed)
block_comment "/**\n * Reads the next CPIO file entry and positions stre"...
method_declaration (+389 nodes collapsed)
method_declaration (+43 nodes collapsed)
block_comment "/**\n * Reads from the current CPIO entry into an array o"...
method_declaration (+390 nodes collapsed)
method_declaration (+94 nodes collapsed)
method_declaration (+73 nodes collapsed)
method_declaration (+81 nodes collapsed)
method_declaration (+413 nodes collapsed)
method_declaration (+317 nodes collapsed)
method_declaration (+336 nodes collapsed)
method_declaration (+80 nodes collapsed)
block_comment "/**\n * Skips specified number of bytes in the current CP"...
method_declaration (+196 nodes collapsed)
method_declaration (+25 nodes collapsed)
block_comment "/**\n * Skips the padding zeros written after the TRAILER"...
method_declaration (+97 nodes collapsed)
block_comment "/**\n * Checks if the signature matches one of the follow"...
method_declaration (+281 nodes collapsed)
} "}"

After

program
block_comment "/*\n * Licensed to the Apache Software Foundation (ASF) under"...
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 "cpio"
; ";"
import_declaration
import "import"
scoped_identifier
scoped_identifier
identifier "java"
. "."
identifier "io"
. "."
identifier "EOFException"
; ";"
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
scoped_identifier
scoped_identifier
scoped_identifier
identifier "org"
. "."
identifier "apache"
. "."
identifier "commons"
. "."
identifier "compress"
. "."
identifier "archivers"
. "."
identifier "ArchiveEntry"
; ";"
import_declaration
import "import"
scoped_identifier
scoped_identifier
scoped_identifier
scoped_identifier
scoped_identifier
identifier "org"
. "."
identifier "apache"
. "."
identifier "commons"
. "."
identifier "compress"
. "."
identifier "archivers"
. "."
identifier "ArchiveInputStream"
; ";"
import_declaration (+22 nodes collapsed)
import_declaration (+22 nodes collapsed)
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 "ArchiveUtils"
; ";"
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 * CPIOArchiveInputStream is a stream for reading cpio s"...
class_declaration
modifiers
public "public"
class "class"
identifier "CpioArchiveInputStream"
superclass
extends "extends"
type_identifier "ArchiveInputStream"
super_interfaces
implements "implements"
type_list
type_identifier "CpioConstants"
class_body
{ "{"
field_declaration
modifiers
private "private"
boolean_type "boolean"
variable_declarator
identifier "closed"
= "="
false "false"
; ";"
field_declaration
modifiers
private "private"
type_identifier "CpioArchiveEntry"
variable_declarator
identifier "entry"
; ";"
field_declaration
modifiers
private "private"
integral_type
long "long"
variable_declarator
identifier "entryBytesRead"
= "="
decimal_integer_literal "0"
; ";"
field_declaration
modifiers
private "private"
boolean_type "boolean"
variable_declarator
identifier "entryEOF"
= "="
false "false"
; ";"
field_declaration (+21 nodes collapsed)
field_declaration
modifiers
private "private"
integral_type
long "long"
variable_declarator
identifier "crc"
= "="
decimal_integer_literal "0"
; ";"
field_declaration
modifiers
private "private"
final "final"
type_identifier "InputStream"
variable_declarator
identifier "in"
; ";"
line_comment "// cached buffers - must only be used locally in the class ("...
field_declaration (+22 nodes collapsed)
field_declaration (+22 nodes collapsed)
field_declaration (+22 nodes collapsed)
field_declaration
modifiers
private "private"
final "final"
integral_type
int "int"
variable_declarator
identifier "blockSize"
; ";"
block_comment "/**\n * The encoding to use for filenames and labels.\n "...
field_declaration
modifiers
private "private"
final "final"
type_identifier "ZipEncoding"
variable_declarator
identifier "zipEncoding"
; ";"
line_comment "// the provided encoding (for unit tests)"
field_declaration
modifiers
final "final"
type_identifier "String"
variable_declarator
identifier "encoding"
; ";"
block_comment "/**\n * Construct the cpio input stream with a blocksize "...
constructor_declaration (+29 nodes collapsed)
block_comment "/**\n * Construct the cpio input stream with a blocksize "...
constructor_declaration (+30 nodes collapsed)
block_comment "/**\n * Construct the cpio input stream with a blocksize "...
constructor_declaration (+34 nodes collapsed)
block_comment "/**\n * Construct the cpio input stream with a blocksize "...
constructor_declaration
modifiers
public "public"
identifier "CpioArchiveInputStream"
formal_parameters
( "("
formal_parameter
modifiers
final "final"
type_identifier "InputStream"
identifier "in"
, ","
formal_parameter
integral_type
int "int"
identifier "blockSize"
, ","
formal_parameter
type_identifier "String"
identifier "encoding"
) ")"
constructor_body
{ "{"
expression_statement
assignment_expression
field_access
this "this"
. "."
identifier "in"
= "="
identifier "in"
; ";"
expression_statement
assignment_expression
field_access
this "this"
. "."
identifier "blockSize"
= "="
identifier "blockSize"
; ";"
expression_statement
assignment_expression
field_access
this "this"
. "."
identifier "encoding"
= "="
identifier "encoding"
; ";"
expression_statement
assignment_expression
field_access
this "this"
. "."
identifier "zipEncoding"
= "="
method_invocation
identifier "ZipEncodingHelper"
. "."
identifier "getZipEncoding"
argument_list
( "("
identifier "encoding"
) ")"
; ";"
} "}"
block_comment "/**\n * Returns 0 after EOF has reached for the current e"...
method_declaration (+45 nodes collapsed)
block_comment "/**\n * Closes the CPIO input stream.\n * \n * @thr"...
method_declaration (+49 nodes collapsed)
block_comment "/**\n * Closes the current CPIO entry and positions the s"...
method_declaration (+46 nodes collapsed)
block_comment "/**\n * Check to make sure that this stream has not been "...
method_declaration (+39 nodes collapsed)
block_comment "/**\n * Reads the next CPIO file entry and positions stre"...
method_declaration (+389 nodes collapsed)
method_declaration (+43 nodes collapsed)
block_comment "/**\n * Reads from the current CPIO entry into an array o"...
method_declaration (+390 nodes collapsed)
method_declaration (+94 nodes collapsed)
method_declaration (+73 nodes collapsed)
method_declaration (+81 nodes collapsed)
method_declaration (+413 nodes collapsed)
method_declaration (+317 nodes collapsed)
method_declaration (+336 nodes collapsed)
method_declaration (+80 nodes collapsed)
block_comment "/**\n * Skips specified number of bytes in the current CP"...
method_declaration (+196 nodes collapsed)
method_declaration (+25 nodes collapsed)
block_comment "/**\n * Skips the padding zeros written after the TRAILER"...
method_declaration (+97 nodes collapsed)
block_comment "/**\n * Checks if the signature matches one of the follow"...
method_declaration (+281 nodes collapsed)
} "}"