File tree Expand file tree Collapse file tree
cbor/src/test/java/com/fasterxml/jackson/dataformat/cbor
smile/src/test/java/com/fasterxml/jackson/dataformat/smile Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -110,6 +110,18 @@ protected CBORGenerator stringrefCborGenerator(ByteArrayOutputStream result)
110110 .createGenerator (result );
111111 }
112112
113+ /*
114+ /**********************************************************
115+ /* Parser construction
116+ /**********************************************************
117+ */
118+
119+ protected JsonParser createParserUsingStream (TokenStreamFactory f , byte [] input )
120+ throws IOException
121+ {
122+ return f .createParser (new ByteArrayInputStream (input ));
123+ }
124+
113125 /*
114126 /**********************************************************
115127 /* Additional assertion methods
Original file line number Diff line number Diff line change @@ -269,6 +269,10 @@ protected static byte[] utf8Bytes(String str) {
269269 return str .getBytes (StandardCharsets .UTF_8 );
270270 }
271271
272+ protected static String utf8String (ByteArrayOutputStream bytes ) {
273+ return new String (bytes .toByteArray (), StandardCharsets .UTF_8 );
274+ }
275+
272276 protected static byte [] concat (byte [] ... chunks )
273277 {
274278 int len = 0 ;
You can’t perform that action at this time.
0 commit comments