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–91 unchanged (91 lines)
92 /**
93 * The encoding to use for filenames and labels.
94 */
95 private final ZipEncoding zipEncoding;
96
97 // the provided encoding (for unit tests)
98
99 /**
100 * Construct the cpio output stream with a specified format, a
101 * blocksize of {@link CpioConstants#BLOCK_SIZE BLOCK_SIZE} and
102 * using ASCII as the file name encoding.
103 *
104 * @param out
…lines 105–155 unchanged (51 lines)
156 default:
157 throw new IllegalArgumentException("Unknown format: "+format);
158
159 }
160 this.entryFormat = format;
161 this.blockSize = blockSize;
162 this.zipEncoding = ZipEncodingHelper.getZipEncoding(encoding);
163 }
164
165 /**
166 * Construct the cpio output stream. The format for this CPIO stream is the
167 * "new" format using ASCII encoding for file names
168 *
…lines 169–561 unchanged (393 lines)

After

…lines 1–91 unchanged (91 lines)
92 /**
93 * The encoding to use for filenames and labels.
94 */
95 private final ZipEncoding zipEncoding;
96
97 // the provided encoding (for unit tests)
98 final String encoding;
99
100 /**
101 * Construct the cpio output stream with a specified format, a
102 * blocksize of {@link CpioConstants#BLOCK_SIZE BLOCK_SIZE} and
103 * using ASCII as the file name encoding.
104 *
…lines 105–156 unchanged (52 lines)
157 default:
158 throw new IllegalArgumentException("Unknown format: "+format);
159
160 }
161 this.entryFormat = format;
162 this.blockSize = blockSize;
163 this.encoding = encoding;
164 this.zipEncoding = ZipEncodingHelper.getZipEncoding(encoding);
165 }
166
167 /**
168 * Construct the cpio output stream. The format for this CPIO stream is the
169 * "new" format using ASCII encoding for file names
…lines 170–563 unchanged (394 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 "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 "OutputStream"
; ";"
import_declaration
import "import"
scoped_identifier
scoped_identifier
identifier "java"
. "."
identifier "nio"
. "."
identifier "ByteBuffer"
; ";"
import_declaration
import "import"
scoped_identifier
scoped_identifier
identifier "java"
. "."
identifier "util"
. "."
identifier "HashMap"
; ";"
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 "ArchiveOutputStream"
; ";"
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"
; ";"
block_comment "/**\n * CPIOArchiveOutputStream is a stream for writing CPIO "...
class_declaration
modifiers
public "public"
class "class"
identifier "CpioArchiveOutputStream"
superclass
extends "extends"
type_identifier "ArchiveOutputStream"
super_interfaces
implements "implements"
type_list
type_identifier "CpioConstants"
class_body
{ "{"
field_declaration
modifiers
private "private"
type_identifier "CpioArchiveEntry"
variable_declarator
identifier "entry"
; ";"
field_declaration
modifiers
private "private"
boolean_type "boolean"
variable_declarator
identifier "closed"
= "="
false "false"
; ";"
block_comment "/** indicates if this archive is finished */"
field_declaration
modifiers
private "private"
boolean_type "boolean"
variable_declarator
identifier "finished"
; ";"
block_comment "/**\n * See {@link CpioArchiveEntry#setFormat(short)} for"...
field_declaration
modifiers
private "private"
final "final"
integral_type
short "short"
variable_declarator
identifier "entryFormat"
; ";"
field_declaration (+29 nodes collapsed)
field_declaration
modifiers
private "private"
integral_type
long "long"
variable_declarator
identifier "crc"
= "="
decimal_integer_literal "0"
; ";"
field_declaration
modifiers
private "private"
integral_type
long "long"
variable_declarator
identifier "written"
; ";"
field_declaration
modifiers
private "private"
final "final"
type_identifier "OutputStream"
variable_declarator
identifier "out"
; ";"
field_declaration
modifiers
private "private"
final "final"
integral_type
int "int"
variable_declarator
identifier "blockSize"
; ";"
field_declaration
modifiers
private "private"
integral_type
long "long"
variable_declarator
identifier "nextArtificalDeviceAndInode"
= "="
decimal_integer_literal "1"
; ";"
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 output stream with a specified"...
constructor_declaration (+38 nodes collapsed)
block_comment "/**\n * Construct the cpio output stream with a specified"...
constructor_declaration (+45 nodes collapsed)
block_comment "/**\n * Construct the cpio output stream with a specified"...
constructor_declaration
modifiers
public "public"
identifier "CpioArchiveOutputStream"
formal_parameters (+28 nodes collapsed)
constructor_body
{ "{"
expression_statement
assignment_expression
field_access
this "this"
. "."
identifier "out"
= "="
identifier "out"
; ";"
switch_expression (+52 nodes collapsed)
expression_statement
assignment_expression
field_access
this "this"
. "."
identifier "entryFormat"
= "="
identifier "format"
; ";"
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 * Construct the cpio output stream. The format for "...
constructor_declaration (+24 nodes collapsed)
block_comment "/**\n * Construct the cpio output stream. The format for "...
constructor_declaration (+32 nodes collapsed)
block_comment "/**\n * Check to make sure that this stream has not been "...
method_declaration (+39 nodes collapsed)
block_comment "/**\n * Begins writing a new CPIO file entry and position"...
method_declaration (+259 nodes collapsed)
method_declaration (+220 nodes collapsed)
method_declaration (+413 nodes collapsed)
method_declaration (+345 nodes collapsed)
method_declaration (+365 nodes collapsed)
block_comment "/*(non-Javadoc)\n * \n * @see\n * org.apache.common"...
method_declaration (+234 nodes collapsed)
block_comment "/**\n * Writes an array of bytes to the current CPIO entr"...
method_declaration (+262 nodes collapsed)
block_comment "/**\n * Finishes writing the contents of the CPIO output "...
method_declaration (+188 nodes collapsed)
block_comment "/**\n * Closes the CPIO output stream as well as the stre"...
method_declaration (+67 nodes collapsed)
method_declaration (+66 nodes collapsed)
method_declaration (+76 nodes collapsed)
method_declaration (+282 nodes collapsed)
block_comment "/**\n * Writes an ASCII string to the stream followed by "...
method_declaration (+105 nodes collapsed)
block_comment "/**\n * Creates a new ArchiveEntry. The entryName must be"...
method_declaration (+58 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 "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 "OutputStream"
; ";"
import_declaration
import "import"
scoped_identifier
scoped_identifier
identifier "java"
. "."
identifier "nio"
. "."
identifier "ByteBuffer"
; ";"
import_declaration
import "import"
scoped_identifier
scoped_identifier
identifier "java"
. "."
identifier "util"
. "."
identifier "HashMap"
; ";"
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 "ArchiveOutputStream"
; ";"
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"
; ";"
block_comment "/**\n * CPIOArchiveOutputStream is a stream for writing CPIO "...
class_declaration
modifiers
public "public"
class "class"
identifier "CpioArchiveOutputStream"
superclass
extends "extends"
type_identifier "ArchiveOutputStream"
super_interfaces
implements "implements"
type_list
type_identifier "CpioConstants"
class_body
{ "{"
field_declaration
modifiers
private "private"
type_identifier "CpioArchiveEntry"
variable_declarator
identifier "entry"
; ";"
field_declaration
modifiers
private "private"
boolean_type "boolean"
variable_declarator
identifier "closed"
= "="
false "false"
; ";"
block_comment "/** indicates if this archive is finished */"
field_declaration
modifiers
private "private"
boolean_type "boolean"
variable_declarator
identifier "finished"
; ";"
block_comment "/**\n * See {@link CpioArchiveEntry#setFormat(short)} for"...
field_declaration
modifiers
private "private"
final "final"
integral_type
short "short"
variable_declarator
identifier "entryFormat"
; ";"
field_declaration (+29 nodes collapsed)
field_declaration
modifiers
private "private"
integral_type
long "long"
variable_declarator
identifier "crc"
= "="
decimal_integer_literal "0"
; ";"
field_declaration
modifiers
private "private"
integral_type
long "long"
variable_declarator
identifier "written"
; ";"
field_declaration
modifiers
private "private"
final "final"
type_identifier "OutputStream"
variable_declarator
identifier "out"
; ";"
field_declaration
modifiers
private "private"
final "final"
integral_type
int "int"
variable_declarator
identifier "blockSize"
; ";"
field_declaration
modifiers
private "private"
integral_type
long "long"
variable_declarator
identifier "nextArtificalDeviceAndInode"
= "="
decimal_integer_literal "1"
; ";"
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 output stream with a specified"...
constructor_declaration (+38 nodes collapsed)
block_comment "/**\n * Construct the cpio output stream with a specified"...
constructor_declaration (+45 nodes collapsed)
block_comment "/**\n * Construct the cpio output stream with a specified"...
constructor_declaration
modifiers
public "public"
identifier "CpioArchiveOutputStream"
formal_parameters (+28 nodes collapsed)
constructor_body
{ "{"
expression_statement
assignment_expression
field_access
this "this"
. "."
identifier "out"
= "="
identifier "out"
; ";"
switch_expression (+52 nodes collapsed)
expression_statement
assignment_expression
field_access
this "this"
. "."
identifier "entryFormat"
= "="
identifier "format"
; ";"
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 * Construct the cpio output stream. The format for "...
constructor_declaration (+24 nodes collapsed)
block_comment "/**\n * Construct the cpio output stream. The format for "...
constructor_declaration (+32 nodes collapsed)
block_comment "/**\n * Check to make sure that this stream has not been "...
method_declaration (+39 nodes collapsed)
block_comment "/**\n * Begins writing a new CPIO file entry and position"...
method_declaration (+259 nodes collapsed)
method_declaration (+220 nodes collapsed)
method_declaration (+413 nodes collapsed)
method_declaration (+345 nodes collapsed)
method_declaration (+365 nodes collapsed)
block_comment "/*(non-Javadoc)\n * \n * @see\n * org.apache.common"...
method_declaration (+234 nodes collapsed)
block_comment "/**\n * Writes an array of bytes to the current CPIO entr"...
method_declaration (+262 nodes collapsed)
block_comment "/**\n * Finishes writing the contents of the CPIO output "...
method_declaration (+188 nodes collapsed)
block_comment "/**\n * Closes the CPIO output stream as well as the stre"...
method_declaration (+67 nodes collapsed)
method_declaration (+66 nodes collapsed)
method_declaration (+76 nodes collapsed)
method_declaration (+282 nodes collapsed)
block_comment "/**\n * Writes an ASCII string to the stream followed by "...
method_declaration (+105 nodes collapsed)
block_comment "/**\n * Creates a new ArchiveEntry. The entryName must be"...
method_declaration (+58 nodes collapsed)
} "}"