MCPcopy Create free account
hub / github.com/google/re2j / Utf8MatcherInput

Class Utf8MatcherInput

java/com/google/re2j/MatcherInput.java:50–76  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

48 abstract int length();
49
50 static class Utf8MatcherInput extends MatcherInput {
51 byte[] bytes;
52
53 public Utf8MatcherInput(byte[] bytes) {
54 this.bytes = bytes;
55 }
56
57 @Override
58 public Encoding getEncoding() {
59 return Encoding.UTF_8;
60 }
61
62 @Override
63 public CharSequence asCharSequence() {
64 return new String(bytes, Charset.forName("UTF-8"));
65 }
66
67 @Override
68 public byte[] asBytes() {
69 return bytes;
70 }
71
72 @Override
73 public int length() {
74 return bytes.length;
75 }
76 }
77
78 static class Utf16MatcherInput extends MatcherInput {
79 CharSequence charSequence;

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…