@Override
	public synchronized int read() throws IOException {
		if (closed) {
			throw new IOException("Stream closed");
		}
		byte[] buf = new byte[1];
		if (0 == read(buf)) {
			return -1;
		}
		return buf[0] & 0x0FF;
	}
Wrap the given file descriptor in an {@link InputStream}

@param fd the file descriptor
Ghidra/Framework/Pty/src/main/java/ghidra/pty/unix/FdInputStream.java