Read the values from the port file in the file system.
Expects the port file to be locked.
162690
public void getValues()  {
        containsPortInfo = false;
        if (lock == null) {
            // Not locked, remain ignorant about port file contents.
            return;
        }
        try {
            if (rwfile.length()>0) {
                rwfile.seek(0);
                int nr = rwfile.readInt();
                serverPort = rwfile.readInt();
                serverCookie = rwfile.readLong();

                if (nr == magicNr) {
                    containsPortInfo = true;
                } else {
                    containsPortInfo = false;
                }
            }
        } catch (IOException e) {
            containsPortInfo = false;
        }
    }
1034505
private void read() {
        // define the specification format
        final int key = 0;
        final int description = 1;
        final int offset = 2;
        final int length = 3;
        SpecificationFormat format = new SpecificationFormat(key, description,
                offset, length);
        // read the header data
        try {
            data = IOUtil.readHeaderEntries(COFFHeaderKey.class, format,
                    COFF_SPEC_FILE, headerbytes, getOffset());
        } catch (IOException e) {
            logger.error("unable to read coff specification: " + e.getMessage());
        }
    }
913083
def read_nonblocking(self, size=1, timeout=None):
        

        try:
            s = os.read(self.child_fd, size)
        except OSError as err:
            if err.args[0] == errno.EIO:
                # Linux-style EOF
                self.flag_eof = True
                raise EOF('End Of File (EOF). Exception style platform.')
            raise
        if s == b'':
            # BSD-style EOF
            self.flag_eof = True
            raise EOF('End Of File (EOF). Empty string style platform.')

        s = self._decoder.decode(s, final=False)
        self._log(s, 'read')
        return s
1036001
def _read(self):
        
        filepos = self._fp.tell()
        if filepos < 1:
            return ""
        destpos = max(filepos - self._chunk_size, 0)
        self._fp.seek(destpos)
        buf = self._fp.read(filepos - destpos)
        self._fp.seek(destpos)
        return buf
274324
def read(self, fd):
        
        args = {
            'fd': fd,
        }

        data = self._client.json('filesystem.read', args)
        return base64.decodebytes(data.encode())
1339275
protected synchronized void readFile() {
        if (realmFile != null && realmFile.exists() && (realmFile.lastModified() != lastModified)) {
            lastModified = realmFile.lastModified();
            try {
                Preconditions.checkArgument(realmFile.canRead(), "The file '{}' can not be read!", realmFile);
                Config config = ConfigFactory.parseFile(realmFile);
                super.setup(config);
            } catch (Exception e) {
                log.error("Failed to read {}", realmFile, e);
            }
        }
    }
1043358
def _read(self):
        
        if self._dask:
            d = da.from_delayed(
                delayed(read_from_bpch, )(
                    self.filename, self.file_position, self.shape,
                    self.dtype, self.endian, use_mmap=self._mmap
                ),
                self.shape, self.dtype
            )
        else:
            d = read_from_bpch(
                    self.filename, self.file_position, self.shape,
                    self.dtype, self.endian, use_mmap=self._mmap
            )

        return d
130105
@Override
    public synchronized Lock obtainReadLock() {
        File writeLock = getWriteLock();

        if (writeLock != null && writeLock.exists()) {
            return null;
        }

        return createLock(false);
    }
175544
private static int port(final File file) throws Exception {
        while (!file.exists()) {
            TimeUnit.MILLISECONDS.sleep(1L);
        }
        final int port;
        try (InputStream input = Files.newInputStream(file.toPath())) {
            // @checkstyle MagicNumber (1 line)
            final byte[] buf = new byte[10];
            while (true) {
                if (input.read(buf) > 0) {
                    break;
                }
            }
            port = Integer.parseInt(
                new TrimmedText(new Utf8String(buf)).asString()
            );
        }
        return port;
    }
198114
def read(self, _file):
        """"""
        with open(_file) as fh:
            data = fh.read()
            if self.verbose:
                sys.stdout.write("read %d bytes from %s\n"
                                 % (fh.tell(), _file))
        return data
487823
public byte read() throws IOException {
        if (current >= fsize) {
            throw new java.io.EOFException("Reached EOF, file size=" + fsize);
        }

        final byte ret = file[current++];
        return ret;
    }
1245759
def read(self, length=1000, blocking=False):
        
        size_p = PLARGE_INTEGER(LARGE_INTEGER(0))
        if not blocking:
            windll.kernel32.GetFileSizeEx(self.conout_pipe, size_p)
            size = size_p[0]
            length = min(size, length)
        data = ctypes.create_string_buffer(length)
        if length > 0:
            num_bytes = PLARGE_INTEGER(LARGE_INTEGER(0))
            ReadFile(self.conout_pipe, data, length, num_bytes, None)
        return data.value
914665
private void read() throws IOException {
        final byte[] data = new byte[sectorCount * sectorSize];
        device.read(offset, ByteBuffer.wrap(data));

        for (int i = 0; i < entries.length; i++)
            entries[i] = fatType.readEntry(data, i);
    }
458179
public int read(long fileOffset, byte []buffer, int offset, int length)
    throws IOException
  {
    _file.seek(fileOffset);
    
    return _file.read(buffer, offset, length);
  }
120867
def _read_keyvals(filename):
        
        assert isinstance(filename, str)
        if os.path.exists(filename):
            return _KeyValuePersister._actually_populate_keyvals(filename)
        else:
            return {}
711720
@Override
  public int read () throws IOException
  {
    _ensureOpen ();
    if (m_nBufPos < m_aBuf.length)
      return m_aBuf[m_nBufPos++];

    return super.read ();
  }
996226
private void readValues()
            throws IOException
    {
        lastReadInputCheckpoint = input.getCheckpoint();

        int control = input.read();
        if (control == -1) {
            throw new OrcCorruptionException(input.getOrcDataSourceId(), "Read past end of RLE integer");
        }

        if (control < 0x80) {
            numLiterals = control + MIN_REPEAT_SIZE;
            used = 0;
            repeat = true;
            delta = input.read();
            if (delta == -1) {
                throw new OrcCorruptionException(input.getOrcDataSourceId(), "End of stream in RLE Integer");
            }

            // convert from 0 to 255 to -128 to 127 by converting to a signed byte
            // noinspection SillyAssignment
            delta = (byte) delta;
            literals[0] = LongDecode.readVInt(signed, input);
        }
        else {
            numLiterals = 0x100 - control;
            used = 0;
            repeat = false;
            for (int i = 0; i < numLiterals; ++i) {
                literals[i] = LongDecode.readVInt(signed, input);
            }
        }
    }