@Override protected int writeToOutputStream(DataBuffer dataBuffer) throws IOException { ByteBuffer input = dataBuffer.asByteBuffer(); int len = input.remaining(); ServletResponse response = getNativeResponse(); ((HttpOutput) response.getOutputStream()).write(input); return len; } }
@Override protected int writeToOutputStream(DataBuffer dataBuffer) throws IOException { ByteBuffer input = dataBuffer.asByteBuffer(); int len = input.remaining(); ServletResponse response = getNativeResponse(); ((HttpOutput) response.getOutputStream()).write(input); return len; } }
@Override protected CompletableFuture<Optional<Object>> send(final Optional<Object> id, final byte[] data) { synchronized (this) { CompletableFuture<Optional<Object>> future = new CompletableFuture<>(); try { out.write(data); out.flush(); future.complete(id); } catch (Throwable ex) { future.completeExceptionally(ex); ifClose(ex); } return future; } }
public void write(int b) throws IOException { written = true; out.write(b); } public void write(byte[] b, int off, int len) throws IOException {
public void write(int b) throws IOException { written = true; out.write(b); } public void write(byte[] b, int off, int len) throws IOException {
public void write(byte[] b, int off, int len) throws IOException { written = true; out.write(b, off, len); }
@Override public void print(String s) throws IOException { write(s.getBytes()); } }
@Override public void print(String s) throws IOException { write(s.getBytes()); } }
@Override public void print(String s) throws IOException { write(s.getBytes()); } }
@Override public void print(String s) throws IOException { write(s.getBytes()); } }
@Override public void write(byte[] b, int off, int len) throws IOException { write(new ByteArrayBuffer(b,off,len)); }
@Override public void write(byte[] b) throws IOException { write(new ByteArrayBuffer(b)); }
@Override public void write(byte[] b) throws IOException { write(new ByteArrayBuffer(b)); }
@Override public void write(byte[] b) throws IOException { write(new ByteArrayBuffer(b)); }
@Override public void write(byte[] b, int off, int len) throws IOException { write(new ByteArrayBuffer(b,off,len)); }
@Override public void write(byte[] b) throws IOException { write(new ByteArrayBuffer(b)); }
@Override public void print(String s) throws IOException { if (isClosed()) throw new IOException("Closed"); write(s.getBytes(_channel.getResponse().getCharacterEncoding())); }
@Override public void print(String s) throws IOException { if (isClosed()) throw new IOException("Closed"); write(s.getBytes(_channel.getResponse().getCharacterEncoding())); }
@Override public void write(int b) throws IOException { if (_onebyte==null) _onebyte=new ByteArrayBuffer(1); else _onebyte.clear(); _onebyte.put((byte)b); write(_onebyte); }
@Override public void write(int b) throws IOException { if (_onebyte==null) _onebyte=new ByteArrayBuffer(1); else _onebyte.clear(); _onebyte.put((byte)b); write(_onebyte); }