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

Class Utf16MatcherInput

java/com/google/re2j/MatcherInput.java:78–104  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

76 }
77
78 static class Utf16MatcherInput extends MatcherInput {
79 CharSequence charSequence;
80
81 public Utf16MatcherInput(CharSequence charSequence) {
82 this.charSequence = charSequence;
83 }
84
85 @Override
86 public Encoding getEncoding() {
87 return Encoding.UTF_16;
88 }
89
90 @Override
91 public CharSequence asCharSequence() {
92 return charSequence;
93 }
94
95 @Override
96 public byte[] asBytes() {
97 return charSequence.toString().getBytes(Charset.forName("UTF-16"));
98 }
99
100 @Override
101 public int length() {
102 return charSequence.length();
103 }
104 }
105}

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…