@Override public char[] getTextCharacters() throws IOException, JsonParseException { return getText().toCharArray(); }
@Override public int getTextLength() throws IOException, JsonParseException { return getText().length(); }
@Override public int getTextLength() throws IOException, JsonParseException { return getText().length(); }
@Override public int getTextLength() throws IOException, JsonParseException { return getText().length(); }
@Override public char[] getTextCharacters() throws IOException, JsonParseException { return getText().toCharArray(); }
@Override public int getTextLength() throws IOException, JsonParseException { return getText().length(); }
@Override public char[] getTextCharacters() throws IOException, JsonParseException { return getText().toCharArray(); }
@Override public char[] getTextCharacters() throws IOException, JsonParseException { return getText().toCharArray(); }
@Override public char[] getTextCharacters() throws IOException, JsonParseException { return getText().toCharArray(); }
@Override public int getTextLength() throws IOException, JsonParseException { return getText().length(); }
@Override public int getTextLength() throws IOException, JsonParseException { return getText().length(); }
@Override public int getTextLength() throws IOException, JsonParseException { return getText().length(); }
@Override public char[] getTextCharacters() throws IOException, JsonParseException { return getText().toCharArray(); }
@Override public char[] getTextCharacters() throws IOException, JsonParseException { return getText().toCharArray(); }
@Override public String getText() { return replace(super.getText(), finalParameters); } };
public <O> O decodeBase64(String pointer, Class<O> type, ObjectMapper objectMapper) { byte[] data; try { TreeTraversingParser parser = new TreeTraversingParser(getPointer(pointer != null ? pointer : "", contextToNode()), objectMapper); parser.nextToken(); data = Base64.getDecoder().decode(parser.getText()); } catch (IOException e) { throw new IllegalArgumentException("Value in stage context at pointer " + pointer + " is not base 64 encoded", e); } try { return objectMapper.readValue(data, type); } catch (IOException e) { throw new RuntimeException("Could not convert " + new String(data, UTF_8) + " to " + type.getSimpleName(), e); } }