| 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; |
nothing calls this directly
no outgoing calls
no test coverage detected
searching dependent graphs…