Returns the socket's input stream.
184382
@Override
  public StreamImpl stream()
    throws IOException
  {
    if (_channelStream == null) {
      _channelStream = new SocketChannelStream();
    }
    
    if (_sslSocket == null) {
      _channelStream.init(_channel);
      _streamImpl = _channelStream;
    }
    else {
      if (_sslStream == null) {
        _sslStream = new SocketStream();
      }
      
      _sslStream.init(_sslSocket);
      _streamImpl = _sslStream;
    }

    return _streamImpl;
  }
430388
def get_event_stream(self):
        
        if self._event_stream is None:
            self._event_stream = WVAEventStream(self._http_client)
        return self._event_stream
258333
public InputStream readInputStream()
        throws IOException
    {
        int tag = read();

        switch (tag) {
            case 'N':
                return null;

            case 'B':
            case 'b':
                _isLastChunk = tag == 'B';
                _chunkLength = (read() << 8) + read();
                break;

            default:
                throw expect("inputStream", tag);
        }

        return new InputStream() {
            boolean _isClosed = false;

            public int read()
                throws IOException
            {
                if (_isClosed || _is == null)
                    return -1;

                int ch = parseByte();
                if (ch < 0)
                    _isClosed = true;

                return ch;
            }

            public int read(byte[] buffer, int offset, int length)
                throws IOException
            {
                if (_isClosed || _is == null)
                    return -1;

                int len = HessianInput.this.read(buffer, offset, length);
                if (len < 0)
                    _isClosed = true;

                return len;
            }

            public void close()
                throws IOException
            {
                while (read() >= 0) {
                }

                _isClosed = true;
            }
        };
    }
1282889
public InputStream getInputStream() throws IOException {
    InputStream is = this.servletContext.getResourceAsStream(this.path);
    if (is == null) { throw new FileNotFoundException("Could not open " + getDescription()); }
    return is;
  }
1264505
public static ByteBuffer getByteBufferFromInputStreamAndCloseStream(InputStream is) throws IOException {
        try {
            // is.available() may return 0, or 1, or the total number of bytes in the stream,
            // or some other number.
            // Do not try to use is.available() == 0 to find the end of the stream!
            byte[] bytes;
            int avail = is.available();
            if (avail > 32) {
                // There are more bytes available than just the ICU data header length.
                // With luck, it is the total number of bytes.
                bytes = new byte[avail];
            } else {
                bytes = new byte[128];  // empty .res files are even smaller
            }
            // Call is.read(...) until one returns a negative value.
            int length = 0;
            for(;;) {
                if (length < bytes.length) {
                    int numRead = is.read(bytes, length, bytes.length - length);
                    if (numRead < 0) {
                        break;  // end of stream
                    }
                    length += numRead;
                } else {
                    // See if we are at the end of the stream before we grow the array.
                    int nextByte = is.read();
                    if (nextByte < 0) {
                        break;
                    }
                    int capacity = 2 * bytes.length;
                    if (capacity < 128) {
                        capacity = 128;
                    } else if (capacity < 0x4000) {
                        capacity *= 2;  // Grow faster until we reach 16kB.
                    }
                    // TODO Java 6 replace new byte[] and arraycopy(): bytes = Arrays.copyOf(bytes, capacity);
                    byte[] newBytes = new byte[capacity];
                    System.arraycopy(bytes, 0, newBytes, 0, length);
                    bytes = newBytes;
                    bytes[length++] = (byte) nextByte;
                }
            }
            return ByteBuffer.wrap(bytes, 0, length);
        } finally {
            is.close();
        }
    }
220283
public InputStream getInputStream() throws IOException {
		FileItemWrap wrapper = getValue();

		if (wrapper != null) {
			return wrapper.getInputStream();
		}

		return null;
	}
544025
public InputStream getInputStream()
    {
        InputStream stream=null;
        try
        {
            stream=this.commPort.getInputStream();
        }
        catch(IOException exception)
        {
            throw new FaxException("Unable to extract input stream.",exception);
        }
        
        return stream;
    }
821858
protected OutputStream getOutputStream()
        throws IOException
    {
        if (os == null && server != null)
            os = server.writeChannel(channel);

        return os;
    }
1360723
@Override
  public StreamImpl stream()
    throws IOException
  {
    if (_streamImpl == null) {
      _streamImpl = new SocketStream();
    }

    _streamImpl.init(_s);

    return _streamImpl;
  }
445487
def getInput():
    """"""
    input = ''

    if sys.platform == 'win32':
        import msvcrt
        if msvcrt.kbhit():  # Check for a keyboard hit.
            input += msvcrt.getch()
            print_(input)
        else:
            time.sleep(.1)

    else:  # Other platforms
        # Posix will work with sys.stdin or sys.stdin.fileno()
        # Mac needs the file descriptor.
        # This solution does not work for windows since select
        # expects a socket, and I have no idea how to create a
        # socket from standard input.
        sock = sys.stdin.fileno()

        # select(rlist, wlist, xlist, timeout)
        while len(select.select([sock], [], [], 0.1)[0]) > 0:
            input += decode(os.read(sock, 4096))

    return input
437943
public InputStream getInputStream()
    throws IOException
  {
    if (_is == null)
      _is = new FileInputStream(_file.getFD());

    return _is;
  }
1218525
def getinputencoding(stream=None):
    
    if stream is None:
        stream = sys.stdin
    encoding = stream.encoding
    if not encoding:
        encoding = getpreferredencoding()
    return encoding
400835
@Override
    public InputStream getInputStream() throws IOException {
        try {
            InputStream result = entry.adapt(InputStream.class);
            if (result == null) {
                throw new IOException("The entry did not supply an input stream: " + entry);
            }
            return result;
        } catch (UnableToAdaptException e) {
            throw new IOException("Unable to get input stream for entry: " + entry.getPath() + '/' + entry.getName(), e);
        }
    }
741606
protected function getSocketStream()
    {
        if (!is_resource($this->socketResource)) {
            $this->connect();
            return $this->socketResource;
        }
        $meta = stream_get_meta_data($this->socketResource);
        if (($meta['timed_out'] || $meta['eof']))
            $this->connect();
        return $this->socketResource;
    }
1179408
protected void read() throws Exception {
    InputStream is = socket.getInputStream();
    while (is.available() > 0) {
      byte[] bytes = new byte[1024 * 1024];
      int read = is.read(bytes);
      byte[] actuallyRead = new byte[read];
      System.arraycopy(bytes, 0, actuallyRead, 0, read);
      pushInput(actuallyRead);
    }
  }
156833
public synchronized InputStream getInputStream() throws IOException {
        if (!connected) {
            connect();
        }

        // Nothing to return
        if (responseCode == HTTP_NOT_FOUND) {
            throw new FileNotFoundException(url.toString());
        }
        int length;

        if (inputStream == null) {
            return null;
        }

        // "De-chunk" the output stream
        else if ("chunked".equalsIgnoreCase(getHeaderField("Transfer-Encoding"))) {
            if (!(inputStream instanceof ChunkedInputStream)) {
                inputStream = new ChunkedInputStream(inputStream);
            }
        }

        // Make sure we don't wait forever, if the content-length is known
        else if ((length = getHeaderFieldInt("Content-Length", -1)) >= 0) {
            if (!(inputStream instanceof FixedLengthInputStream)) {
                inputStream = new FixedLengthInputStream(inputStream, length);
            }
        }
        return inputStream;
    }
1197952
def stream(self):
        """"""

        if not hasattr(self, '_stream'):
            if self.file is not None:
                self._stream = self.file
            elif self.filename is not None:
                self._stream = open(self.filename, 'rb')
            elif self.text is not None:
                self._stream = StringIO(self.text)
            elif self.data is not None:
                self._stream = BytesIO(self.data)
            else:
                raise ValueError('Broken Data, all None.')
        return self._stream