public class BinaryQueryNamedValue extends Object
Constructor and Description |
---|
BinaryQueryNamedValue(String name,
byte[] value)
Create a new named value that is in a query string
|
BinaryQueryNamedValue(String name,
long value)
Create a new named value that is in a query string.
|
BinaryQueryNamedValue(String name,
String value)
Create a new named value that is in a query string.
|
BinaryQueryNamedValue(String name,
String value,
Charset wireEncoding)
Create a new named value that is in a query string
|
Modifier and Type | Method and Description |
---|---|
String |
getName()
Get the name of this named value
|
String |
getUrlEncodedValue() |
byte[] |
getValue()
Get the value of this named value
|
String |
getValue(Charset charset)
Get the value of this named value as a String decoded from the specified charset
|
long |
getValueAsLong()
Get the value of this named value as a long
|
String |
getValueAsUtf8Str()
Get the value of this named value as a String decoded from UTF-8
|
public BinaryQueryNamedValue(String name, byte[] value)
name
- the name of the valuevalue
- the valuepublic BinaryQueryNamedValue(String name, String value)
name
- the name of the valuevalue
- the valuepublic BinaryQueryNamedValue(String name, String value, Charset wireEncoding)
name
- the name of the valuevalue
- the valuewireEncoding
- the charset to encode the value with when sent in a urlrequestpublic BinaryQueryNamedValue(String name, long value)
name
- the name of the valuevalue
- the valuepublic String getName()
public byte[] getValue()
public String getValueAsUtf8Str()
public String getValue(Charset charset)
public long getValueAsLong()
IllegalArgumentException
- if this string isn't a longpublic String getUrlEncodedValue()
Copyright © 2016–2021. All rights reserved.