public void writeCacheTo(StringBuilder out, long limit) throws IOException { writeCacheTo(out, "UTF-8", limit); }
public void writeCacheTo(StringBuilder out, long limit) throws IOException { writeCacheTo(out, "UTF-8", limit); }
public void writeCacheTo(StringBuilder out) throws IOException { writeCacheTo(out, "UTF-8"); }
public void writeCacheTo(StringBuilder out) throws IOException { writeCacheTo(out, "UTF-8"); }
public void writeCacheTo(StringBuilder out, long limit) throws IOException { writeCacheTo(out, StandardCharsets.UTF_8.name(), limit); }
public void writeCacheTo(StringBuilder out) throws IOException { writeCacheTo(out, StandardCharsets.UTF_8.name()); }
public void writeCacheTo(StringBuilder out) throws IOException { writeCacheTo(out, StandardCharsets.UTF_8.name()); }
public void writeCacheTo(StringBuilder out, long limit) throws IOException { writeCacheTo(out, StandardCharsets.UTF_8.name(), limit); }
protected void writePayload(StringBuilder builder, CachedOutputStream cos, String encoding, String contentType) throws Exception { if (StringUtils.isEmpty(encoding)) { cos.writeCacheTo(builder, lim); } else { cos.writeCacheTo(builder, encoding, lim); } } }
protected void writePayload(StringBuilder builder, CachedOutputStream cos, String encoding, String contentType) throws Exception { if (StringUtils.isEmpty(encoding)) { cos.writeCacheTo(builder, lim); } else { cos.writeCacheTo(builder, encoding, lim); } } }
public String toString() { StringBuilder builder = new StringBuilder().append("[") .append(CachedOutputStream.class.getName()) .append(" Content: "); try { writeCacheTo(builder); } catch (IOException e) { //ignore } return builder.append("]").toString(); }
public String toString() { StringBuilder builder = new StringBuilder().append("[") .append(CachedOutputStream.class.getName()) .append(" Content: "); try { writeCacheTo(builder); } catch (IOException e) { //ignore } return builder.append("]").toString(); }
public String toString() { StringBuilder builder = new StringBuilder().append("[") .append(CachedOutputStream.class.getName()) .append(" Content: "); try { writeCacheTo(builder); } catch (IOException e) { //ignore } return builder.append("]").toString(); }
public String toString() { StringBuilder builder = new StringBuilder().append("[") .append(CachedOutputStream.class.getName()) .append(" Content: "); try { writeCacheTo(builder); } catch (IOException e) { //ignore } return builder.append("]").toString(); }
public void handleMessage(Message message) throws Fault { OutputStream os = message.getContent(OutputStream.class); StringBuilder responsePayload = new StringBuilder(); CachedOutputStream cos = (CachedOutputStream) os; try { cos.writeCacheTo(responsePayload); } catch (IOException e) { e.printStackTrace(); } }
private void handleOutputStream(final LogEvent event, Message message, CachedOutputStream cos) throws IOException { String encoding = (String) message.get(Message.ENCODING); if (StringUtils.isEmpty(encoding)) { encoding = StandardCharsets.UTF_8.name(); } StringBuilder payload = new StringBuilder(); cos.writeCacheTo(payload, encoding, limit); cos.close(); event.setPayload(payload.toString()); boolean isTruncated = cos.size() > limit && limit != -1; event.setTruncated(isTruncated); event.setFullContentFile(cos.getTempFile()); }
private void handleOutputStream(final LogEvent event, Message message, CachedOutputStream cos) throws IOException { String encoding = (String) message.get(Message.ENCODING); if (StringUtils.isEmpty(encoding)) { encoding = StandardCharsets.UTF_8.name(); } StringBuilder payload = new StringBuilder(); cos.writeCacheTo(payload, encoding, limit); cos.close(); event.setPayload(payload.toString()); boolean isTruncated = cos.size() > limit && limit != -1; event.setTruncated(isTruncated); event.setFullContentFile(cos.getTempFile()); }
@Override public void close() throws IOException { if (closed) { return; } closed = true; if (!chunking && wrappedStream instanceof CachedOutputStream) { CachedOutputStream out = (CachedOutputStream)wrappedStream; this.basicEntity.setContentLength(out.size()); wrappedStream = null; handleHeadersTrustCaching(); out.writeCacheTo(wrappedStream); } super.close(); }
void send(boolean complete) throws IOException { if (out == null) { return; } if (response.getStatus() >= 400) { int i = response.getStatus(); response.setStatus(200); response.addIntHeader(WebSocketUtils.SC_KEY, i); } out.flush(); out.lockOutputStream(); out.writeCacheTo(delegate); delegate.flush(); out.close(); out = null; }
void send(boolean complete) throws IOException { if (out == null) { return; } if (response.getStatus() >= 400) { int i = response.getStatus(); response.setStatus(200); response.addIntHeader(WebSocketUtils.SC_KEY, i); } out.flush(); out.lockOutputStream(); out.writeCacheTo(delegate); delegate.flush(); out.close(); out = null; }