class_body
{ "{"
field_declaration (+31 nodes collapsed)
field_declaration
modifiers
static "static"
final "final"
type_identifier "String"
variable_declarator
identifier "defaultCharset"
= "="
string_literal
" "\""
string_fragment "UTF-8"
" "\""
; ";"
line_comment "// used if not found in header or meta charset"
field_declaration
modifiers
private "private"
static "static"
final "final"
integral_type
int "int"
variable_declarator
identifier "bufferSize"
= "="
hex_integer_literal "0x20000"
; ";"
line_comment "// ~130K."
constructor_declaration
modifiers
private "private"
identifier "DataUtil"
formal_parameters
( "("
) ")"
constructor_body
{ "{"
} "}"
block_comment "/**\n * Loads a file to a Document.\n * @param in file"...
method_declaration (+106 nodes collapsed)
block_comment "/**\n * Parses a Document from an input steam.\n * @pa"...
method_declaration (+59 nodes collapsed)
block_comment "/**\n * Parses a Document from an input steam, using the "...
method_declaration (+57 nodes collapsed)
line_comment "// reads bytes first into a buffer, then decodes with the ap"...
line_comment "// switching the chartset midstream when a meta http-equiv t"...
line_comment "// todo - this is getting gnarly. needs a rewrite."
method_declaration
modifiers
static "static"
type_identifier "Document"
identifier "parseByteData"
formal_parameters
( "("
formal_parameter
type_identifier "ByteBuffer"
identifier "byteData"
, ","
formal_parameter
type_identifier "String"
identifier "charsetName"
, ","
formal_parameter
type_identifier "String"
identifier "baseUri"
, ","
formal_parameter
type_identifier "Parser"
identifier "parser"
) ")"
block
{ "{"
local_variable_declaration
type_identifier "String"
variable_declarator
identifier "docData"
; ";"
local_variable_declaration
type_identifier "Document"
variable_declarator
identifier "doc"
= "="
null_literal "null"
; ";"
if_statement (+403 nodes collapsed)
line_comment "// UTF-8 BOM indicator. takes precedence over everything els"...
if_statement
if "if"
parenthesized_expression (+26 nodes collapsed)
block
{ "{"
expression_statement
method_invocation
identifier "byteData"
. "."
identifier "rewind"
argument_list
( "("
) ")"
; ";"
expression_statement (+26 nodes collapsed)
expression_statement
assignment_expression
identifier "docData"
= "="
method_invocation
identifier "docData"
. "."
identifier "substring"
argument_list
( "("
decimal_integer_literal "1"
) ")"
; ";"
expression_statement
assignment_expression
identifier "charsetName"
= "="
identifier "defaultCharset"
; ";"
} "}"
if_statement (+43 nodes collapsed)
return_statement
return "return"
identifier "doc"
; ";"
} "}"
block_comment "/**\n * Read the input stream into a byte buffer.\n * "...
method_declaration (+216 nodes collapsed)
method_declaration (+28 nodes collapsed)
block_comment "/**\n * Parse out a charset from a content type header. I"...
method_declaration (+187 nodes collapsed)
} "}"