Top Description Constructors Methods
org.apache.commons.compress.utils

public final Class ParsingUtils

extends Object
Class Inheritance
Imports
java.io.IOException

Utility methods for parsing data and converting it to other formats.
Since
1.26.0

Constructor Summary

AccessConstructor and Description
private

Method Summary

Modifier and TypeMethod and Description
public static int

Returns:

parsed value as an int
parseIntValue
(final String
string value to parse
value
)

Parses the provided string value to an Integer, assuming a base-10 radix

public static int

Returns:

parsed value as an int
parseIntValue
(final String
string value to parse
value
,
final int
radix value to use for parsing
radix
)

Parse the provided string value to an Integer with a provided radix

public static long

Returns:

parsed value as a long
parseLongValue
(final String
string value to parse
value
)

Parses the provided string value to a Long, assuming a base-10 radix

public static long

Returns:

parsed value as a long
parseLongValue
(final String
string value to parse
value
,
final int
radix value to use for parsing
radix
)

Parses the provided string value to a Long with a provided radix

Inherited from java.lang.Object:
cloneequalsfinalizegetClasshashCodenotifynotifyAlltoStringwaitwaitwait

Constructor Detail

ParsingUtilsback to summary
private ParsingUtils()

Method Detail

parseIntValueback to summary
public static int parseIntValue(final String value) throws IOException

Parses the provided string value to an Integer, assuming a base-10 radix

Parameters
value:String

string value to parse

Returns:int

parsed value as an int

Exceptions
IOException:
when the value cannot be parsed
parseIntValueback to summary
public static int parseIntValue(final String value, final int radix) throws IOException

Parse the provided string value to an Integer with a provided radix

Parameters
value:String

string value to parse

radix:int

radix value to use for parsing

Returns:int

parsed value as an int

Exceptions
IOException:
when the value cannot be parsed
parseLongValueback to summary
public static long parseLongValue(final String value) throws IOException

Parses the provided string value to a Long, assuming a base-10 radix

Parameters
value:String

string value to parse

Returns:long

parsed value as a long

Exceptions
IOException:
when the value cannot be parsed
parseLongValueback to summary
public static long parseLongValue(final String value, final int radix) throws IOException

Parses the provided string value to a Long with a provided radix

Parameters
value:String

string value to parse

radix:int

radix value to use for parsing

Returns:long

parsed value as a long

Exceptions
IOException:
when the value cannot be parsed