Class ToBytes
- java.lang.Object
-
- uk.gov.gchq.koryphe.function.KorypheFunction<String,byte[]>
-
- uk.gov.gchq.koryphe.impl.function.ToBytes
-
public class ToBytes extends KorypheFunction<String,byte[]>
AToBytes
is aFunction
that takes in a string and extracts the bytes using the provided charset.
-
-
Field Summary
Fields Modifier and Type Field Description static Charset
DEFAULT_CHARSET
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description byte[]
apply(String string)
boolean
equals(Object o)
Charset
getCharset()
String
getCharsetAsString()
int
hashCode()
void
setCharset(String charsetString)
void
setCharset(Charset charset)
-
-
-
Field Detail
-
DEFAULT_CHARSET
public static final Charset DEFAULT_CHARSET
-
-
Method Detail
-
apply
public byte[] apply(String string)
-
getCharset
public Charset getCharset()
-
setCharset
public void setCharset(Charset charset)
-
setCharset
public void setCharset(String charsetString)
-
getCharsetAsString
public String getCharsetAsString()
-
equals
public boolean equals(Object o)
- Overrides:
equals
in classKorypheFunction<String,byte[]>
-
hashCode
public int hashCode()
- Overrides:
hashCode
in classKorypheFunction<String,byte[]>
-
-