Home | History | Annotate | Download | only in channels

Lines Matching refs:ch

43 import sun.nio.ch.ChannelInputStream;
75 private static void writeFullyImpl(WritableByteChannel ch, ByteBuffer bb)
79 int n = ch.write(bb);
91 private static void writeFully(WritableByteChannel ch, ByteBuffer bb)
94 if (ch instanceof SelectableChannel) {
95 SelectableChannel sc = (SelectableChannel)ch;
99 writeFullyImpl(ch, bb);
102 writeFullyImpl(ch, bb);
119 * @param ch
124 public static InputStream newInputStream(ReadableByteChannel ch) {
125 checkNotNull(ch, "ch");
126 return new sun.nio.ch.ChannelInputStream(ch);
138 * @param ch
143 public static OutputStream newOutputStream(final WritableByteChannel ch) {
144 checkNotNull(ch, "ch");
175 Channels.writeFully(ch, bb);
179 ch.close();
193 * @param ch
200 public static InputStream newInputStream(final AsynchronousByteChannel ch) {
201 checkNotNull(ch, "ch");
240 return ch.read(bb).get();
255 ch.close();
267 * @param ch
274 public static OutputStream newOutputStream(final AsynchronousByteChannel ch) {
275 checkNotNull(ch, "ch");
312 ch.write(bb).get();
327 ch.close();
485 * @param ch
498 public static Reader newReader(ReadableByteChannel ch,
502 checkNotNull(ch, "ch");
503 return StreamDecoder.forDecoder(ch, dec.reset(), minBufferCap);
513 * Channels.newReader(ch, csname)</pre></blockquote>
518 * Channels.newReader(ch,
523 * @param ch
535 public static Reader newReader(ReadableByteChannel ch,
539 return newReader(ch, Charset.forName(csName).newDecoder(), -1);
554 * @param ch
567 public static Writer newWriter(final WritableByteChannel ch,
571 checkNotNull(ch, "ch");
572 return StreamEncoder.forEncoder(ch, enc.reset(), minBufferCap);
582 * Channels.newWriter(ch, csname)</pre></blockquote>
587 * Channels.newWriter(ch,
592 * @param ch
604 public static Writer newWriter(WritableByteChannel ch,
608 return newWriter(ch, Charset.forName(csName).newEncoder(), -1);