ToBytes

See javadoc - uk.gov.gchq.koryphe.impl.function.ToBytes

Available since Koryphe version 1.8.0

Extracts the bytes from a string

Examples

String to bytes

Java
JSON
Full JSON
Python
final ToBytes toBytes = new ToBytes(StandardCharsets.UTF_16);
{
  "class" : "ToBytes",
  "charset" : "UTF-16"
}
{
  "class" : "uk.gov.gchq.koryphe.impl.function.ToBytes",
  "charset" : "UTF-16"
}
g.ToBytes( 
  charset="UTF-16" 
)

Input type:

java.lang.String

Example inputs:

Input TypeInputResult TypeResult
java.lang.Stringexample Stringbyte[]��example String
java.lang.Stringbyte[]
nullnull
java.lang.Integer1ClassCastException: java.lang.Integer cannot be cast to java.lang.String

results matching ""

    No results matching ""