Read a single byte from the user without waiting for the \n character
175709
def _read_byte(self):
        
        from .getch import _Getch
        try:
            g = _Getch()
            self.tape[self.pointer] = ord(g())
        except TypeError as e:
            print "Here's what _Getch() is giving me {}".format(g())
1083952
def readn(self, n):
        
        data = ''

        while len(data) < n:
            received = self.sock.recv(n - len(data))

            if not len(received):
                raise socket.error('no data read from socket')

            data += received

        return data
825956
public int read(byte []buf, int offset, int length) throws IOException
  {
    if (_is == null)
      return -1;

    int len = _is.read(buf, offset, length);

    return len;
  }
1178077
def readByte(self):
        
        byte = unpack('B' if not self.signed else 'b', self.readAt(self.offset, 1))[0]
        self.offset += 1
        return byte
178546
private static String readString(DataInput reader) throws IOException {
		int blocks = reader.readUnsignedByte();
		int bitMask = blocks & 0xC0;
		if (bitMask == 0x40) {
			// Blocks are in 2 bytes.
			blocks = ((0x3F & blocks) << 8) | reader.readUnsignedByte();
		} else if (bitMask == 0x80) {
			// Blocks are in 3 bytes.
			blocks = ((0x3F & blocks) << 16) | (reader.readUnsignedByte() << 8) | reader.readUnsignedByte();
		} else if (bitMask == 0xC0) {
			// Blocks are in 4 bytes.
			blocks = ((0x3F & blocks) << 24) | (reader.readUnsignedByte() << 16) | (reader.readUnsignedByte() << 8) | reader.readUnsignedByte();
		}
		String result;
		if (blocks == 0) {
			result = null;
		} else if (blocks < 0) {
			throw new DeserializerException("Wrong 'null' indicator for a string", "0", Integer.toString(blocks));
		} else {
			StringBuilder sb = new StringBuilder();
			for (int i=0; i<blocks; i++) {
				sb.append(reader.readUTF());
			}
			result = sb.toString();
		}
		return result;
	}
94208
def read(self, n=-1):
        
        buf = ''
        if n is None:
            n = -1
        while True:
            if n < 0:
                data = self.read1(n)
            elif n > len(buf):
                data = self.read1(n - len(buf))
            else:
                return buf
            if len(data) == 0:
                return buf
            buf += data
1141313
function readStdin() {
    var stdin = process.stdin,
      fd = stdin.isTTY && process.platform !== 'win32' ?
        fs.openSync('/dev/tty', 'rs') : stdin.fd,
      bufSize = stdin.isTTY ? DEFAULT_BUF_SIZE :
        (fs.fstatSync(fd).size || DEFAULT_BUF_SIZE),
      buffer = Buffer.allocUnsafe && Buffer.alloc ? Buffer.alloc(bufSize) : new Buffer(bufSize),
      rsize, input = '';
    while (true) {
      rsize = 0;
      try {
        rsize = fs.readSync(fd, buffer, 0, bufSize);
      } catch (e) {
        if (e.code === 'EOF') { break; }
        throw e;
      }
      if (rsize === 0) { break; }
      input += buffer.toString(program.encoding, 0, rsize);
    }
    return input;
  }
699979
def read_from(io)
      nbytes = @limit - @position
      raise OverflowError, "buffer is full" if nbytes.zero?

      bytes_read = IO.try_convert(io).read_nonblock(nbytes, exception: false)
      return 0 if bytes_read == :wait_readable

      self << bytes_read
      bytes_read.length
    end
173522
def read_exactly(socket, n):
    
    data = six.binary_type()
    while len(data) < n:
        next_data = read(socket, n - len(data))
        if not next_data:
            raise SocketError("Unexpected EOF")
        data += next_data
    return data
487645
def read_shortstr(self):
        
        self.bitcount = self.bits = 0
        slen = unpack('B', self.input.read(1))[0]
        return self.input.read(slen).decode('utf-8')
381166
private StringBuilder read(int n) throws IOException {
        // Input stream finished?
        boolean eof = false;
        // Read that many.
        final StringBuilder s = new StringBuilder(n);
        while (s.length() < n && !eof) {
            // Always get from the pushBack buffer.
            if (pushBack.length() == 0) {
                // Read something from the stream into pushBack.
                eof = readIntoPushBack();
            }

            // Pushback only contains deliverable codes.
            if (pushBack.length() > 0) {
                // Grab one character
                s.append(pushBack.charAt(0));
                // Remove it from pushBack
                pushBack.deleteCharAt(0);
            }

        }
        return s;
    }
1115286
private static int readFully(InputStream in, ByteArrayOutputStream bout,
            int length) throws IOException {
        int read = 0;
        byte[] buffer = new byte[2048];
        while (length > 0) {
            int n = in.read(buffer, 0, length<2048?length:2048);
            if (n <= 0) {
                break;
            }
            bout.write(buffer, 0, n);
            read += n;
            length -= n;
        }
        return read;
    }
311093
protected void bypassWrite(byte[] b, int offset, int length)
        throws IOException
    {
        int i=9;                    
        int chunk=length;
        _buf[10]=(byte)'\012';
        _buf[9]=(byte)'\015';
        while (chunk>0)
        {
            int d=chunk%16;
            if (d<=9)
                _buf[--i]=(byte)('0'+d);
            else
                _buf[--i]=(byte)('a'-10+d);
            chunk=chunk/16;
        }
        if (_chunking)
            _out.write(_buf,i,10-i+1);
        _out.write(b,offset,length);
        if (_chunking)
            _out.write(__CRLF,0,__CRLF.length);
        _out.flush();
    }
307079
public static String readStringOpt(DataInput in) throws IOException {
    final int length = WritableUtils.readVInt(in);
    if (length == NULL_STRING_LENGTH) {
      return null;
    }
    byte [] bytes = new byte[length];
    in.readFully(bytes, 0, length);
    char[] charArray = UTF8.getCharArray(length);
    for (int i = 0; i < bytes.length; i++) {
      if (bytes[i] < UTF8.MIN_ASCII_CODE) {
        // non-ASCII codepoints' higher bytes
        // are of the form (10xxxxxx), hence the bytes
        // represent a non-ASCII string
        // do expensive conversion
        return decode(bytes);
      }
      // copy to temporary array
      charArray[i] = (char) bytes[i];
    }
    // only ASCII bytes, do fast conversion
    // using bytes as actual characters
    return new String(charArray, 0, length);
  }
1315589
def _readbin(self, length, start):
        """"""
        if not length:
            return ''
        # Get the byte slice containing our bit slice
        startbyte, startoffset = divmod(start + self._offset, 8)
        endbyte = (start + self._offset + length - 1) // 8
        b = self._datastore.getbyteslice(startbyte, endbyte + 1)
        # Convert to a string of '0' and '1's (via a hex string an and int!)
        try:
            c = "{:0{}b}".format(int(binascii.hexlify(b), 16), 8*len(b))
        except TypeError:
            # Hack to get Python 2.6 working
            c = "{0:0{1}b}".format(int(binascii.hexlify(str(b)), 16), 8*len(b))
        # Finally chop off any extra bits.
        return c[startoffset:startoffset + length]
567769
String readNonEscaped() throws IOException {
		StringBuilder s = new StringBuilder();
		do {
			int c = reader.read();
			if (c < 0) {
				return s.toString().trim();
			}
			if (c == SEPARATOR || c == '\n') {
				reader.unread(c);
				return s.toString().trim();
			} else {
				s.append((char) c);
			}
		} while (true);
	}
514525
private char readEscapedChar() throws IOException {
    int ch = getChar();
    switch (ch) {
      case '"' : return '"';
      case '\'' : return '\'';
      case '\\' : return '\\';
      case '/' : return '/';
      case 'n' : return '\n';
      case 'r' : return '\r';
      case 't' : return '\t';
      case 'f' : return '\f';
      case 'b' : return '\b';
      case 'u' :
        return (char)(
               (hexval(getChar()) << 12)
             | (hexval(getChar()) << 8)
             | (hexval(getChar()) << 4)
             | (hexval(getChar())));
    }
    if ( (flags & ALLOW_BACKSLASH_ESCAPING_ANY_CHARACTER) != 0 && ch != EOF) {
      return (char)ch;
    }
    throw err("Invalid character escape");
  }