MCPcopy Index your code
hub / github.com/jwtk/jjwt / AbstractTextCodec

Class AbstractTextCodec

impl/src/main/java/io/jsonwebtoken/impl/AbstractTextCodec.java:27–45  ·  view source on GitHub ↗

@deprecated since 0.10.0 - will be removed before 1.0.0. Use Encoder orr Decoder instead.

Source from the content-addressed store, hash-verified

25 * @deprecated since 0.10.0 - will be removed before 1.0.0. Use {@link Encoder} orr {@link Decoder} instead.
26 */
27@Deprecated
28public abstract class AbstractTextCodec implements TextCodec {
29
30 protected static final Charset UTF8 = Charset.forName("UTF-8");
31 protected static final Charset US_ASCII = Charset.forName("US-ASCII");
32
33 @Override
34 public String encode(String data) {
35 Assert.hasText(data, "String argument to encode cannot be null or empty.");
36 byte[] bytes = data.getBytes(UTF8);
37 return encode(bytes);
38 }
39
40 @Override
41 public String decodeToString(String encoded) {
42 byte[] bytes = decode(encoded);
43 return new String(bytes, UTF8);
44 }
45}

Callers

nothing calls this directly

Calls 1

forNameMethod · 0.45

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…