Lines Matching refs:ch

42 import sun.nio.ch.ChannelInputStream;
74 private static void writeFullyImpl(WritableByteChannel ch, ByteBuffer bb)
78 int n = ch.write(bb);
90 private static void writeFully(WritableByteChannel ch, ByteBuffer bb)
93 if (ch instanceof SelectableChannel) {
94 SelectableChannel sc = (SelectableChannel)ch;
98 writeFullyImpl(ch, bb);
101 writeFullyImpl(ch, bb);
118 * @param ch
123 public static InputStream newInputStream(ReadableByteChannel ch) {
124 checkNotNull(ch, "ch");
125 return new sun.nio.ch.ChannelInputStream(ch);
137 * @param ch
142 public static OutputStream newOutputStream(final WritableByteChannel ch) {
143 checkNotNull(ch, "ch");
174 Channels.writeFully(ch, bb);
178 ch.close();
192 * @param ch
199 public static InputStream newInputStream(final AsynchronousByteChannel ch) {
200 checkNotNull(ch, "ch");
239 return ch.read(bb).get();
254 ch.close();
266 * @param ch
273 public static OutputStream newOutputStream(final AsynchronousByteChannel ch) {
274 checkNotNull(ch, "ch");
311 ch.write(bb).get();
326 ch.close();
490 * @param ch
503 public static Reader newReader(ReadableByteChannel ch,
507 checkNotNull(ch, "ch");
508 return StreamDecoder.forDecoder(ch, dec.reset(), minBufferCap);
518 * Channels.newReader(ch, csname)</pre></blockquote>
523 * Channels.newReader(ch,
528 * @param ch
540 public static Reader newReader(ReadableByteChannel ch,
544 return newReader(ch, Charset.forName(csName).newDecoder(), -1);
559 * @param ch
572 public static Writer newWriter(final WritableByteChannel ch,
576 checkNotNull(ch, "ch");
577 return StreamEncoder.forEncoder(ch, enc.reset(), minBufferCap);
587 * Channels.newWriter(ch, csname)</pre></blockquote>
592 * Channels.newWriter(ch,
597 * @param ch
609 public static Writer newWriter(WritableByteChannel ch,
613 return newWriter(ch, Charset.forName(csName).newEncoder(), -1);