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–523 unchanged (523 lines)
524 * Closes this output stream and releases any system resources
525 * associated with the stream.
526 *
527 * @exception IOException if an I/O error occurs.
528 */
529 public void close() throws IOException {
530 finish();
531 if (raf != null) {
532 raf.close();
533 }
534 if (out != null) {
535 out.close();
536 }
…lines 537–919 unchanged (383 lines)

After

…lines 1–523 unchanged (523 lines)
524 * Closes this output stream and releases any system resources
525 * associated with the stream.
526 *
527 * @exception IOException if an I/O error occurs.
528 */
529 public void close() throws IOException {
530 if (raf != null) {
531 raf.close();
532 }
533 if (out != null) {
534 out.close();
535 }
536 }
…lines 537–918 unchanged (382 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 "zip"
; ";"
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 "FileOutputStream"
; ";"
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 "io"
. "."
identifier "RandomAccessFile"
; ";"
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
identifier "java"
. "."
identifier "util"
. "."
identifier "Iterator"
; ";"
import_declaration
import "import"
scoped_identifier
scoped_identifier
identifier "java"
. "."
identifier "util"
. "."
identifier "LinkedList"
; ";"
import_declaration
import "import"
scoped_identifier
scoped_identifier
identifier "java"
. "."
identifier "util"
. "."
identifier "List"
; ";"
import_declaration
import "import"
scoped_identifier
scoped_identifier
identifier "java"
. "."
identifier "util"
. "."
identifier "Map"
; ";"
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
identifier "java"
. "."
identifier "util"
. "."
identifier "zip"
. "."
identifier "Deflater"
; ";"
import_declaration
import "import"
scoped_identifier
scoped_identifier
scoped_identifier
identifier "java"
. "."
identifier "util"
. "."
identifier "zip"
. "."
identifier "ZipException"
; ";"
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"
; ";"
block_comment "/**\n * Reimplementation of {@link java.util.zip.ZipOutputStr"...
class_declaration
modifiers
public "public"
class "class"
identifier "ZipArchiveOutputStream"
superclass
extends "extends"
type_identifier "ArchiveOutputStream"
class_body
{ "{"
field_declaration
modifiers
static "static"
final "final"
integral_type
int "int"
variable_declarator
identifier "BYTE_MASK"
= "="
hex_integer_literal "0xFF"
; ";"
field_declaration
modifiers
private "private"
static "static"
final "final"
integral_type
int "int"
variable_declarator
identifier "SHORT"
= "="
decimal_integer_literal "2"
; ";"
field_declaration
modifiers
private "private"
static "static"
final "final"
integral_type
int "int"
variable_declarator
identifier "WORD"
= "="
decimal_integer_literal "4"
; ";"
field_declaration
modifiers
static "static"
final "final"
integral_type
int "int"
variable_declarator
identifier "BUFFER_SIZE"
= "="
decimal_integer_literal "512"
; ";"
block_comment "/* \n * Apparently Deflater.setInput gets slowed down a l"...
field_declaration
modifiers
private "private"
static "static"
final "final"
integral_type
int "int"
variable_declarator
identifier "DEFLATER_BLOCK_SIZE"
= "="
decimal_integer_literal "8192"
; ";"
block_comment "/**\n * Compression method for deflated entries.\n */"
field_declaration (+24 nodes collapsed)
block_comment "/**\n * Default compression level for deflated entries.\n "...
field_declaration
modifiers
public "public"
static "static"
final "final"
integral_type
int "int"
variable_declarator
identifier "DEFAULT_COMPRESSION"
= "="
field_access
identifier "Deflater"
. "."
identifier "DEFAULT_COMPRESSION"
; ";"
block_comment "/**\n * Compression method for stored entries.\n */"
field_declaration (+24 nodes collapsed)
block_comment "/**\n * default encoding for file names and comment.\n "...
field_declaration
modifiers
static "static"
final "final"
type_identifier "String"
variable_declarator
identifier "DEFAULT_ENCODING"
= "="
field_access
identifier "ZipEncodingHelper"
. "."
identifier "UTF8"
; ";"
block_comment "/**\n * General purpose flag, which indicates that filena"...
field_declaration
modifiers
public "public"
static "static"
final "final"
integral_type
int "int"
variable_declarator
identifier "EFS_FLAG"
= "="
binary_expression
decimal_integer_literal "1"
<< "<<"
decimal_integer_literal "11"
; ";"
block_comment "/**\n * Current entry.\n */"
field_declaration
modifiers
private "private"
type_identifier "ZipArchiveEntry"
variable_declarator
identifier "entry"
; ";"
block_comment "/**\n * The file comment.\n */"
field_declaration
modifiers
private "private"
type_identifier "String"
variable_declarator
identifier "comment"
= "="
string_literal
" "\""
" "\""
; ";"
block_comment "/**\n * Compression level for next entry.\n */"
field_declaration
modifiers
private "private"
integral_type
int "int"
variable_declarator
identifier "level"
= "="
identifier "DEFAULT_COMPRESSION"
; ";"
block_comment "/**\n * Has the compression level changed when compared t"...
field_declaration
modifiers
private "private"
boolean_type "boolean"
variable_declarator
identifier "hasCompressionLevelChanged"
= "="
false "false"
; ";"
block_comment "/**\n * Default compression method for next entry.\n *"...
field_declaration (+22 nodes collapsed)
block_comment "/**\n * List of ZipArchiveEntries written so far.\n */"
field_declaration
modifiers
private "private"
final "final"
type_identifier "List"
variable_declarator
identifier "entries"
= "="
object_creation_expression
new "new"
type_identifier "LinkedList"
argument_list
( "("
) ")"
; ";"
block_comment "/**\n * CRC instance to avoid parsing DEFLATED data twice"...
field_declaration
modifiers
private "private"
final "final"
type_identifier "CRC32"
variable_declarator
identifier "crc"
= "="
object_creation_expression
new "new"
type_identifier "CRC32"
argument_list
( "("
) ")"
; ";"
block_comment "/**\n * Count the bytes written to out.\n */"
field_declaration
modifiers
private "private"
integral_type
long "long"
variable_declarator
identifier "written"
= "="
decimal_integer_literal "0"
; ";"
block_comment "/**\n * Data for local header data\n */"
field_declaration
modifiers
private "private"
integral_type
long "long"
variable_declarator
identifier "dataStart"
= "="
decimal_integer_literal "0"
; ";"
block_comment "/**\n * Offset for CRC entry in the local file header dat"...
field_declaration
modifiers
private "private"
integral_type
long "long"
variable_declarator
identifier "localDataStart"
= "="
decimal_integer_literal "0"
; ";"
block_comment "/**\n * Start of central directory.\n */"
field_declaration
modifiers
private "private"
integral_type
long "long"
variable_declarator
identifier "cdOffset"
= "="
decimal_integer_literal "0"
; ";"
block_comment "/**\n * Length of central directory.\n */"
field_declaration
modifiers
private "private"
integral_type
long "long"
variable_declarator
identifier "cdLength"
= "="
decimal_integer_literal "0"
; ";"
block_comment "/**\n * Helper, a 0 as ZipShort.\n */"
field_declaration (+21 nodes collapsed)
block_comment "/**\n * Helper, a 0 as ZipLong.\n */"
field_declaration (+25 nodes collapsed)
block_comment "/**\n * Holds the offsets of the LFH starts for each entr"...
field_declaration
modifiers
private "private"
final "final"
type_identifier "Map"
variable_declarator
identifier "offsets"
= "="
object_creation_expression
new "new"
type_identifier "HashMap"
argument_list
( "("
) ")"
; ";"
block_comment "/**\n * The encoding to use for filenames and the file co"...
field_declaration
modifiers
private "private"
type_identifier "String"
variable_declarator
identifier "encoding"
= "="
identifier "DEFAULT_ENCODING"
; ";"
block_comment "/**\n * The zip encoding to use for filenames and the fil"...
field_declaration
modifiers
private "private"
type_identifier "ZipEncoding"
variable_declarator
identifier "zipEncoding"
= "="
method_invocation
identifier "ZipEncodingHelper"
. "."
identifier "getZipEncoding"
argument_list
( "("
identifier "DEFAULT_ENCODING"
) ")"
; ";"
block_comment "/**\n * This Deflater object is used for output.\n *\n "...
field_declaration
modifiers
protected "protected"
final "final"
type_identifier "Deflater"
variable_declarator
identifier "def"
= "="
object_creation_expression
new "new"
type_identifier "Deflater"
argument_list
( "("
identifier "level"
, ","
true "true"
) ")"
; ";"
block_comment "/**\n * This buffer servers as a Deflater.\n *\n */"
field_declaration (+22 nodes collapsed)
block_comment "/**\n * Optional random access output.\n */"
field_declaration
modifiers
private "private"
final "final"
type_identifier "RandomAccessFile"
variable_declarator
identifier "raf"
; ";"
field_declaration
modifiers
private "private"
final "final"
type_identifier "OutputStream"
variable_declarator
identifier "out"
; ";"
block_comment "/**\n * whether to use the EFS flag when writing UTF-8 fi"...
field_declaration
modifiers
private "private"
boolean_type "boolean"
variable_declarator
identifier "useEFS"
= "="
true "true"
; ";"
block_comment "/**\n * Whether to encode non-encodable file names as UTF"...
field_declaration
modifiers
private "private"
boolean_type "boolean"
variable_declarator
identifier "fallbackToUTF8"
= "="
false "false"
; ";"
block_comment "/**\n * whether to create UnicodePathExtraField-s for eac"...
field_declaration
modifiers
private "private"
type_identifier "UnicodeExtraFieldPolicy"
variable_declarator
identifier "createUnicodeExtraFields"
= "="
field_access
identifier "UnicodeExtraFieldPolicy"
. "."
identifier "NEVER"
; ";"
block_comment "/**\n * Creates a new ZIP OutputStream filtering the unde"...
constructor_declaration (+31 nodes collapsed)
block_comment "/**\n * Creates a new ZIP OutputStream writing to a File."...
constructor_declaration (+141 nodes collapsed)
block_comment "/**\n * This method indicates whether this archive is wri"...
method_declaration
modifiers
public "public"
boolean_type "boolean"
identifier "isSeekable"
formal_parameters
( "("
) ")"
block
{ "{"
return_statement
return "return"
binary_expression
identifier "raf"
!= "!="
null_literal "null"
; ";"
} "}"
block_comment "/**\n * The encoding to use for filenames and the file co"...
method_declaration (+54 nodes collapsed)
block_comment "/**\n * The encoding to use for filenames and the file co"...
method_declaration
modifiers
public "public"
type_identifier "String"
identifier "getEncoding"
formal_parameters
( "("
) ")"
block
{ "{"
return_statement
return "return"
identifier "encoding"
; ";"
} "}"
block_comment "/**\n * Whether to set the language encoding flag if the "...
method_declaration (+30 nodes collapsed)
block_comment "/**\n * Whether to create Unicode Extra Fields.\n *\n "...
method_declaration
modifiers
public "public"
void_type "void"
identifier "setCreateUnicodeExtraFields"
formal_parameters
( "("
formal_parameter
type_identifier "UnicodeExtraFieldPolicy"
identifier "b"
) ")"
block
{ "{"
expression_statement
assignment_expression
identifier "createUnicodeExtraFields"
= "="
identifier "b"
; ";"
} "}"
block_comment "/**\n * Whether to fall back to UTF and the language enco"...
method_declaration
modifiers
public "public"
void_type "void"
identifier "setFallbackToUTF8"
formal_parameters
( "("
formal_parameter
boolean_type "boolean"
identifier "b"
) ")"
block
{ "{"
expression_statement
assignment_expression
identifier "fallbackToUTF8"
= "="
identifier "b"
; ";"
} "}"
block_comment "/* (non-Javadoc)\n * @see org.apache.commons.compress.arc"...
method_declaration (+125 nodes collapsed)
block_comment "/**\n * Writes all necessary data for this entry.\n * "...
method_declaration (+515 nodes collapsed)
block_comment "/** {@inheritDoc} */"
line_comment "// @throws ClassCastException if entry is not an instance of"...
method_declaration (+285 nodes collapsed)
block_comment "/**\n * Set the file comment.\n * @param comment the c"...
method_declaration (+23 nodes collapsed)
block_comment "/**\n * Sets the compression level for subsequent entries"...
method_declaration (+79 nodes collapsed)
block_comment "/**\n * Sets the default compression method for subsequen"...
method_declaration (+24 nodes collapsed)
block_comment "/**\n * Writes bytes to ZIP entry.\n * @param b the by"...
method_declaration (+267 nodes collapsed)
block_comment "/**\n * Closes this output stream and releases any system"...
method_declaration
modifiers
public "public"
void_type "void"
identifier "close"
formal_parameters
( "("
) ")"
throws
throws "throws"
type_identifier "IOException"
block
{ "{"
expression_statement
method_invocation
identifier "finish"
argument_list
( "("
) ")"
; ";"
if_statement (+21 nodes collapsed)
if_statement (+21 nodes collapsed)
} "}"
block_comment "/**\n * Flushes this output stream and forces any buffere"...
method_declaration (+35 nodes collapsed)
block_comment "/*\n * Various ZIP constants\n */"
block_comment "/**\n * local file header signature\n */"
field_declaration (+24 nodes collapsed)
block_comment "/**\n * data descriptor signature\n */"
field_declaration (+22 nodes collapsed)
block_comment "/**\n * central file header signature\n */"
field_declaration (+24 nodes collapsed)
block_comment "/**\n * end of central dir signature\n */"
field_declaration (+22 nodes collapsed)
block_comment "/**\n * Writes next block of compressed data to the outpu"...
method_declaration (+61 nodes collapsed)
block_comment "/**\n * Writes the local file header entry\n * @param "...
method_declaration (+693 nodes collapsed)
block_comment "/**\n * Writes the data descriptor entry.\n * @param z"...
method_declaration (+123 nodes collapsed)
block_comment "/**\n * Writes the central file header entry.\n * @par"...
method_declaration (+664 nodes collapsed)
block_comment "/**\n * Writes the &quot;End of central dir record&quot;."...
method_declaration (+181 nodes collapsed)
block_comment "/**\n * Write bytes to output or random access file.\n "...
method_declaration (+38 nodes collapsed)
block_comment "/**\n * Write bytes to output or random access file.\n "...
method_declaration (+77 nodes collapsed)
method_declaration (+38 nodes collapsed)
method_declaration (+120 nodes collapsed)
block_comment "/**\n * enum that represents the possible policies for cr"...
class_declaration (+115 nodes collapsed)
method_declaration (+33 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 "zip"
; ";"
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 "FileOutputStream"
; ";"
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 "io"
. "."
identifier "RandomAccessFile"
; ";"
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
identifier "java"
. "."
identifier "util"
. "."
identifier "Iterator"
; ";"
import_declaration
import "import"
scoped_identifier
scoped_identifier
identifier "java"
. "."
identifier "util"
. "."
identifier "LinkedList"
; ";"
import_declaration
import "import"
scoped_identifier
scoped_identifier
identifier "java"
. "."
identifier "util"
. "."
identifier "List"
; ";"
import_declaration
import "import"
scoped_identifier
scoped_identifier
identifier "java"
. "."
identifier "util"
. "."
identifier "Map"
; ";"
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
identifier "java"
. "."
identifier "util"
. "."
identifier "zip"
. "."
identifier "Deflater"
; ";"
import_declaration
import "import"
scoped_identifier
scoped_identifier
scoped_identifier
identifier "java"
. "."
identifier "util"
. "."
identifier "zip"
. "."
identifier "ZipException"
; ";"
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"
; ";"
block_comment "/**\n * Reimplementation of {@link java.util.zip.ZipOutputStr"...
class_declaration
modifiers
public "public"
class "class"
identifier "ZipArchiveOutputStream"
superclass
extends "extends"
type_identifier "ArchiveOutputStream"
class_body
{ "{"
field_declaration
modifiers
static "static"
final "final"
integral_type
int "int"
variable_declarator
identifier "BYTE_MASK"
= "="
hex_integer_literal "0xFF"
; ";"
field_declaration
modifiers
private "private"
static "static"
final "final"
integral_type
int "int"
variable_declarator
identifier "SHORT"
= "="
decimal_integer_literal "2"
; ";"
field_declaration
modifiers
private "private"
static "static"
final "final"
integral_type
int "int"
variable_declarator
identifier "WORD"
= "="
decimal_integer_literal "4"
; ";"
field_declaration
modifiers
static "static"
final "final"
integral_type
int "int"
variable_declarator
identifier "BUFFER_SIZE"
= "="
decimal_integer_literal "512"
; ";"
block_comment "/* \n * Apparently Deflater.setInput gets slowed down a l"...
field_declaration
modifiers
private "private"
static "static"
final "final"
integral_type
int "int"
variable_declarator
identifier "DEFLATER_BLOCK_SIZE"
= "="
decimal_integer_literal "8192"
; ";"
block_comment "/**\n * Compression method for deflated entries.\n */"
field_declaration (+24 nodes collapsed)
block_comment "/**\n * Default compression level for deflated entries.\n "...
field_declaration
modifiers
public "public"
static "static"
final "final"
integral_type
int "int"
variable_declarator
identifier "DEFAULT_COMPRESSION"
= "="
field_access
identifier "Deflater"
. "."
identifier "DEFAULT_COMPRESSION"
; ";"
block_comment "/**\n * Compression method for stored entries.\n */"
field_declaration (+24 nodes collapsed)
block_comment "/**\n * default encoding for file names and comment.\n "...
field_declaration
modifiers
static "static"
final "final"
type_identifier "String"
variable_declarator
identifier "DEFAULT_ENCODING"
= "="
field_access
identifier "ZipEncodingHelper"
. "."
identifier "UTF8"
; ";"
block_comment "/**\n * General purpose flag, which indicates that filena"...
field_declaration
modifiers
public "public"
static "static"
final "final"
integral_type
int "int"
variable_declarator
identifier "EFS_FLAG"
= "="
binary_expression
decimal_integer_literal "1"
<< "<<"
decimal_integer_literal "11"
; ";"
block_comment "/**\n * Current entry.\n */"
field_declaration
modifiers
private "private"
type_identifier "ZipArchiveEntry"
variable_declarator
identifier "entry"
; ";"
block_comment "/**\n * The file comment.\n */"
field_declaration
modifiers
private "private"
type_identifier "String"
variable_declarator
identifier "comment"
= "="
string_literal
" "\""
" "\""
; ";"
block_comment "/**\n * Compression level for next entry.\n */"
field_declaration
modifiers
private "private"
integral_type
int "int"
variable_declarator
identifier "level"
= "="
identifier "DEFAULT_COMPRESSION"
; ";"
block_comment "/**\n * Has the compression level changed when compared t"...
field_declaration
modifiers
private "private"
boolean_type "boolean"
variable_declarator
identifier "hasCompressionLevelChanged"
= "="
false "false"
; ";"
block_comment "/**\n * Default compression method for next entry.\n *"...
field_declaration (+22 nodes collapsed)
block_comment "/**\n * List of ZipArchiveEntries written so far.\n */"
field_declaration
modifiers
private "private"
final "final"
type_identifier "List"
variable_declarator
identifier "entries"
= "="
object_creation_expression
new "new"
type_identifier "LinkedList"
argument_list
( "("
) ")"
; ";"
block_comment "/**\n * CRC instance to avoid parsing DEFLATED data twice"...
field_declaration
modifiers
private "private"
final "final"
type_identifier "CRC32"
variable_declarator
identifier "crc"
= "="
object_creation_expression
new "new"
type_identifier "CRC32"
argument_list
( "("
) ")"
; ";"
block_comment "/**\n * Count the bytes written to out.\n */"
field_declaration
modifiers
private "private"
integral_type
long "long"
variable_declarator
identifier "written"
= "="
decimal_integer_literal "0"
; ";"
block_comment "/**\n * Data for local header data\n */"
field_declaration
modifiers
private "private"
integral_type
long "long"
variable_declarator
identifier "dataStart"
= "="
decimal_integer_literal "0"
; ";"
block_comment "/**\n * Offset for CRC entry in the local file header dat"...
field_declaration
modifiers
private "private"
integral_type
long "long"
variable_declarator
identifier "localDataStart"
= "="
decimal_integer_literal "0"
; ";"
block_comment "/**\n * Start of central directory.\n */"
field_declaration
modifiers
private "private"
integral_type
long "long"
variable_declarator
identifier "cdOffset"
= "="
decimal_integer_literal "0"
; ";"
block_comment "/**\n * Length of central directory.\n */"
field_declaration
modifiers
private "private"
integral_type
long "long"
variable_declarator
identifier "cdLength"
= "="
decimal_integer_literal "0"
; ";"
block_comment "/**\n * Helper, a 0 as ZipShort.\n */"
field_declaration (+21 nodes collapsed)
block_comment "/**\n * Helper, a 0 as ZipLong.\n */"
field_declaration (+25 nodes collapsed)
block_comment "/**\n * Holds the offsets of the LFH starts for each entr"...
field_declaration
modifiers
private "private"
final "final"
type_identifier "Map"
variable_declarator
identifier "offsets"
= "="
object_creation_expression
new "new"
type_identifier "HashMap"
argument_list
( "("
) ")"
; ";"
block_comment "/**\n * The encoding to use for filenames and the file co"...
field_declaration
modifiers
private "private"
type_identifier "String"
variable_declarator
identifier "encoding"
= "="
identifier "DEFAULT_ENCODING"
; ";"
block_comment "/**\n * The zip encoding to use for filenames and the fil"...
field_declaration
modifiers
private "private"
type_identifier "ZipEncoding"
variable_declarator
identifier "zipEncoding"
= "="
method_invocation
identifier "ZipEncodingHelper"
. "."
identifier "getZipEncoding"
argument_list
( "("
identifier "DEFAULT_ENCODING"
) ")"
; ";"
block_comment "/**\n * This Deflater object is used for output.\n *\n "...
field_declaration
modifiers
protected "protected"
final "final"
type_identifier "Deflater"
variable_declarator
identifier "def"
= "="
object_creation_expression
new "new"
type_identifier "Deflater"
argument_list
( "("
identifier "level"
, ","
true "true"
) ")"
; ";"
block_comment "/**\n * This buffer servers as a Deflater.\n *\n */"
field_declaration (+22 nodes collapsed)
block_comment "/**\n * Optional random access output.\n */"
field_declaration
modifiers
private "private"
final "final"
type_identifier "RandomAccessFile"
variable_declarator
identifier "raf"
; ";"
field_declaration
modifiers
private "private"
final "final"
type_identifier "OutputStream"
variable_declarator
identifier "out"
; ";"
block_comment "/**\n * whether to use the EFS flag when writing UTF-8 fi"...
field_declaration
modifiers
private "private"
boolean_type "boolean"
variable_declarator
identifier "useEFS"
= "="
true "true"
; ";"
block_comment "/**\n * Whether to encode non-encodable file names as UTF"...
field_declaration
modifiers
private "private"
boolean_type "boolean"
variable_declarator
identifier "fallbackToUTF8"
= "="
false "false"
; ";"
block_comment "/**\n * whether to create UnicodePathExtraField-s for eac"...
field_declaration
modifiers
private "private"
type_identifier "UnicodeExtraFieldPolicy"
variable_declarator
identifier "createUnicodeExtraFields"
= "="
field_access
identifier "UnicodeExtraFieldPolicy"
. "."
identifier "NEVER"
; ";"
block_comment "/**\n * Creates a new ZIP OutputStream filtering the unde"...
constructor_declaration (+31 nodes collapsed)
block_comment "/**\n * Creates a new ZIP OutputStream writing to a File."...
constructor_declaration (+141 nodes collapsed)
block_comment "/**\n * This method indicates whether this archive is wri"...
method_declaration
modifiers
public "public"
boolean_type "boolean"
identifier "isSeekable"
formal_parameters
( "("
) ")"
block
{ "{"
return_statement
return "return"
binary_expression
identifier "raf"
!= "!="
null_literal "null"
; ";"
} "}"
block_comment "/**\n * The encoding to use for filenames and the file co"...
method_declaration (+54 nodes collapsed)
block_comment "/**\n * The encoding to use for filenames and the file co"...
method_declaration
modifiers
public "public"
type_identifier "String"
identifier "getEncoding"
formal_parameters
( "("
) ")"
block
{ "{"
return_statement
return "return"
identifier "encoding"
; ";"
} "}"
block_comment "/**\n * Whether to set the language encoding flag if the "...
method_declaration (+30 nodes collapsed)
block_comment "/**\n * Whether to create Unicode Extra Fields.\n *\n "...
method_declaration
modifiers
public "public"
void_type "void"
identifier "setCreateUnicodeExtraFields"
formal_parameters
( "("
formal_parameter
type_identifier "UnicodeExtraFieldPolicy"
identifier "b"
) ")"
block
{ "{"
expression_statement
assignment_expression
identifier "createUnicodeExtraFields"
= "="
identifier "b"
; ";"
} "}"
block_comment "/**\n * Whether to fall back to UTF and the language enco"...
method_declaration
modifiers
public "public"
void_type "void"
identifier "setFallbackToUTF8"
formal_parameters
( "("
formal_parameter
boolean_type "boolean"
identifier "b"
) ")"
block
{ "{"
expression_statement
assignment_expression
identifier "fallbackToUTF8"
= "="
identifier "b"
; ";"
} "}"
block_comment "/* (non-Javadoc)\n * @see org.apache.commons.compress.arc"...
method_declaration (+125 nodes collapsed)
block_comment "/**\n * Writes all necessary data for this entry.\n * "...
method_declaration (+515 nodes collapsed)
block_comment "/** {@inheritDoc} */"
line_comment "// @throws ClassCastException if entry is not an instance of"...
method_declaration (+285 nodes collapsed)
block_comment "/**\n * Set the file comment.\n * @param comment the c"...
method_declaration (+23 nodes collapsed)
block_comment "/**\n * Sets the compression level for subsequent entries"...
method_declaration (+79 nodes collapsed)
block_comment "/**\n * Sets the default compression method for subsequen"...
method_declaration (+24 nodes collapsed)
block_comment "/**\n * Writes bytes to ZIP entry.\n * @param b the by"...
method_declaration (+267 nodes collapsed)
block_comment "/**\n * Closes this output stream and releases any system"...
method_declaration
modifiers
public "public"
void_type "void"
identifier "close"
formal_parameters
( "("
) ")"
throws
throws "throws"
type_identifier "IOException"
block
{ "{"
if_statement (+21 nodes collapsed)
if_statement (+21 nodes collapsed)
} "}"
block_comment "/**\n * Flushes this output stream and forces any buffere"...
method_declaration (+35 nodes collapsed)
block_comment "/*\n * Various ZIP constants\n */"
block_comment "/**\n * local file header signature\n */"
field_declaration (+24 nodes collapsed)
block_comment "/**\n * data descriptor signature\n */"
field_declaration (+22 nodes collapsed)
block_comment "/**\n * central file header signature\n */"
field_declaration (+24 nodes collapsed)
block_comment "/**\n * end of central dir signature\n */"
field_declaration (+22 nodes collapsed)
block_comment "/**\n * Writes next block of compressed data to the outpu"...
method_declaration (+61 nodes collapsed)
block_comment "/**\n * Writes the local file header entry\n * @param "...
method_declaration (+693 nodes collapsed)
block_comment "/**\n * Writes the data descriptor entry.\n * @param z"...
method_declaration (+123 nodes collapsed)
block_comment "/**\n * Writes the central file header entry.\n * @par"...
method_declaration (+664 nodes collapsed)
block_comment "/**\n * Writes the &quot;End of central dir record&quot;."...
method_declaration (+181 nodes collapsed)
block_comment "/**\n * Write bytes to output or random access file.\n "...
method_declaration (+38 nodes collapsed)
block_comment "/**\n * Write bytes to output or random access file.\n "...
method_declaration (+77 nodes collapsed)
method_declaration (+38 nodes collapsed)
method_declaration (+120 nodes collapsed)
block_comment "/**\n * enum that represents the possible policies for cr"...
class_declaration (+115 nodes collapsed)
method_declaration (+33 nodes collapsed)
} "}"