class_body
{ "{"
block_comment "/** Fail if a long file name is required in the archive. */"
field_declaration
modifiers
public "public"
static "static"
final "final"
integral_type
int "int"
variable_declarator
identifier "LONGFILE_ERROR"
= "="
decimal_integer_literal "0"
; ";"
block_comment "/** Long paths will be truncated in the archive. */"
field_declaration
modifiers
public "public"
static "static"
final "final"
integral_type
int "int"
variable_declarator
identifier "LONGFILE_TRUNCATE"
= "="
decimal_integer_literal "1"
; ";"
block_comment "/** GNU tar extensions are used to store long file names in "...
field_declaration
modifiers
public "public"
static "static"
final "final"
integral_type
int "int"
variable_declarator
identifier "LONGFILE_GNU"
= "="
decimal_integer_literal "2"
; ";"
block_comment "/** POSIX/PAX extensions are used to store long file names i"...
field_declaration
modifiers
public "public"
static "static"
final "final"
integral_type
int "int"
variable_declarator
identifier "LONGFILE_POSIX"
= "="
decimal_integer_literal "3"
; ";"
block_comment "/** Fail if a big number (e.g. size > 8GiB) is required i"...
field_declaration
modifiers
public "public"
static "static"
final "final"
integral_type
int "int"
variable_declarator
identifier "BIGNUMBER_ERROR"
= "="
decimal_integer_literal "0"
; ";"
block_comment "/** star/GNU tar/BSD tar extensions are used to store big nu"...
field_declaration
modifiers
public "public"
static "static"
final "final"
integral_type
int "int"
variable_declarator
identifier "BIGNUMBER_STAR"
= "="
decimal_integer_literal "1"
; ";"
block_comment "/** POSIX/PAX extensions are used to store big numbers in th"...
field_declaration
modifiers
public "public"
static "static"
final "final"
integral_type
int "int"
variable_declarator
identifier "BIGNUMBER_POSIX"
= "="
decimal_integer_literal "2"
; ";"
field_declaration
modifiers
private "private"
integral_type
long "long"
variable_declarator
identifier "currSize"
; ";"
field_declaration
modifiers
private "private"
type_identifier "String"
variable_declarator
identifier "currName"
; ";"
field_declaration
modifiers
private "private"
integral_type
long "long"
variable_declarator
identifier "currBytes"
; ";"
field_declaration
modifiers
private "private"
final "final"
array_type
integral_type
byte "byte"
dimensions
[ "["
] "]"
variable_declarator
identifier "recordBuf"
; ";"
field_declaration
modifiers
private "private"
integral_type
int "int"
variable_declarator
identifier "assemLen"
; ";"
field_declaration
modifiers
private "private"
final "final"
array_type
integral_type
byte "byte"
dimensions
[ "["
] "]"
variable_declarator
identifier "assemBuf"
; ";"
field_declaration
modifiers
private "private"
integral_type
int "int"
variable_declarator
identifier "longFileMode"
= "="
identifier "LONGFILE_ERROR"
; ";"
field_declaration
modifiers
private "private"
integral_type
int "int"
variable_declarator
identifier "bigNumberMode"
= "="
identifier "BIGNUMBER_ERROR"
; ";"
field_declaration
modifiers
private "private"
integral_type
int "int"
variable_declarator
identifier "recordsWritten"
; ";"
field_declaration
modifiers
private "private"
final "final"
integral_type
int "int"
variable_declarator
identifier "recordsPerBlock"
; ";"
field_declaration
modifiers
private "private"
final "final"
integral_type
int "int"
variable_declarator
identifier "recordSize"
; ";"
field_declaration
modifiers
private "private"
boolean_type "boolean"
variable_declarator
identifier "closed"
= "="
false "false"
; ";"
block_comment "/** Indicates if putArchiveEntry has been called without clo"...
field_declaration
modifiers
private "private"
boolean_type "boolean"
variable_declarator
identifier "haveUnclosedEntry"
= "="
false "false"
; ";"
block_comment "/** indicates if this archive is finished */"
field_declaration
modifiers
private "private"
boolean_type "boolean"
variable_declarator
identifier "finished"
= "="
false "false"
; ";"
field_declaration
modifiers
private "private"
final "final"
type_identifier "OutputStream"
variable_declarator
identifier "out"
; ";"
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
private "private"
boolean_type "boolean"
variable_declarator
identifier "addPaxHeadersForNonAsciiNames"
= "="
false "false"
; ";"
field_declaration (+21 nodes collapsed)
block_comment "/**\n * Constructor for TarInputStream.\n * @param os "...
constructor_declaration (+30 nodes collapsed)
block_comment "/**\n * Constructor for TarInputStream.\n * @param os "...
constructor_declaration (+36 nodes collapsed)
block_comment "/**\n * Constructor for TarInputStream.\n * @param os "...
constructor_declaration (+32 nodes collapsed)
block_comment "/**\n * Constructor for TarInputStream.\n * @param os "...
constructor_declaration (+38 nodes collapsed)
block_comment "/**\n * Constructor for TarInputStream.\n * @param os "...
constructor_declaration (+36 nodes collapsed)
block_comment "/**\n * Constructor for TarInputStream.\n * @param os "...
constructor_declaration
modifiers
public "public"
identifier "TarArchiveOutputStream"
formal_parameters
( "("
formal_parameter
type_identifier "OutputStream"
identifier "os"
, ","
formal_parameter
integral_type
int "int"
identifier "blockSize"
, ","
formal_parameter
integral_type
int "int"
identifier "recordSize"
, ","
formal_parameter
type_identifier "String"
identifier "encoding"
) ")"
constructor_body
{ "{"
expression_statement
assignment_expression
identifier "out"
= "="
object_creation_expression
new "new"
type_identifier "CountingOutputStream"
argument_list
( "("
identifier "os"
) ")"
; ";"
expression_statement
assignment_expression
field_access
this "this"
. "."
identifier "zipEncoding"
= "="
method_invocation
identifier "ZipEncodingHelper"
. "."
identifier "getZipEncoding"
argument_list
( "("
identifier "encoding"
) ")"
; ";"
expression_statement
assignment_expression
field_access
this "this"
. "."
identifier "assemLen"
= "="
decimal_integer_literal "0"
; ";"
expression_statement
assignment_expression
field_access
this "this"
. "."
identifier "assemBuf"
= "="
array_creation_expression
new "new"
integral_type
byte "byte"
dimensions_expr
[ "["
identifier "recordSize"
] "]"
; ";"
expression_statement
assignment_expression
field_access
this "this"
. "."
identifier "recordBuf"
= "="
array_creation_expression
new "new"
integral_type
byte "byte"
dimensions_expr
[ "["
identifier "recordSize"
] "]"
; ";"
expression_statement
assignment_expression
field_access
this "this"
. "."
identifier "recordSize"
= "="
identifier "recordSize"
; ";"
expression_statement
assignment_expression
field_access
this "this"
. "."
identifier "recordsPerBlock"
= "="
binary_expression
identifier "blockSize"
/ "/"
identifier "recordSize"
; ";"
} "}"
block_comment "/**\n * Set the long file mode.\n * This can be LONGFI"...
method_declaration (+24 nodes collapsed)
block_comment "/**\n * Set the big number mode.\n * This can be BIGNU"...
method_declaration (+24 nodes collapsed)
block_comment "/**\n * Whether to add a PAX extension header for non-ASC"...
method_declaration
modifiers
public "public"
void_type "void"
identifier "setAddPaxHeadersForNonAsciiNames"
formal_parameters
( "("
formal_parameter
boolean_type "boolean"
identifier "b"
) ")"
block
{ "{"
expression_statement
assignment_expression
identifier "addPaxHeadersForNonAsciiNames"
= "="
identifier "b"
; ";"
} "}"
method_declaration (+31 nodes collapsed)
method_declaration (+32 nodes collapsed)
block_comment "/**\n * Ends the TAR archive without closing the underlyi"...
method_declaration (+97 nodes collapsed)
block_comment "/**\n * Closes the underlying OutputStream.\n * @throw"...
method_declaration (+61 nodes collapsed)
block_comment "/**\n * Get the record size being used by this stream's T"...
method_declaration
modifiers
public "public"
integral_type
int "int"
identifier "getRecordSize"
formal_parameters
( "("
) ")"
block
{ "{"
return_statement
return "return"
field_access
this "this"
. "."
identifier "recordSize"
; ";"
} "}"
block_comment "/**\n * Put an entry on the output stream. This writes th"...
method_declaration (+445 nodes collapsed)
block_comment "/**\n * Close an entry. This method MUST be called for al"...
method_declaration (+189 nodes collapsed)
block_comment "/**\n * Writes bytes to the current tar archive entry. Th"...
method_declaration (+374 nodes collapsed)
block_comment "/**\n * Writes a PAX extended header with the given map a"...
method_declaration (+412 nodes collapsed)
method_declaration (+143 nodes collapsed)
block_comment "/**\n * @return true if the character could lead to probl"...
method_declaration (+37 nodes collapsed)
block_comment "/**\n * Write an EOF (end of archive) record to the tar a"...
method_declaration (+39 nodes collapsed)
method_declaration (+26 nodes collapsed)
method_declaration (+58 nodes collapsed)
block_comment "/**\n * Write an archive record to the archive.\n *\n "...
method_declaration (+86 nodes collapsed)
block_comment "/**\n * Write an archive record to the archive, where the"...
method_declaration (+107 nodes collapsed)
method_declaration (+67 nodes collapsed)
method_declaration (+216 nodes collapsed)
method_declaration (+72 nodes collapsed)
method_declaration (+191 nodes collapsed)
method_declaration (+40 nodes collapsed)
method_declaration (+41 nodes collapsed)
method_declaration (+83 nodes collapsed)
block_comment "/**\n * Handles long file or link names according to the "...
method_declaration (+288 nodes collapsed)
method_declaration (+91 nodes collapsed)
} "}"