docs: @Override
      public int read() throws IOException {
          if (in == null) {
              throw new IOException("Reading from a closed Base64InputStream");
          }
  
          if (position < 0) {
              int i;
  
              // Read four "meaningful" bytes:
              for (i = 0; i < 4; i++) {
                  int b;
                  do {
                      b = in.read();
                      // treat bytes as ASCII, skip white space only.
                  } while ((b >= 0) && (decodabet[b & 0x7f] == Base64.WHITE_SPACE_ENC));
  
                  if (b < 0) {
                      break;
                  }
  
                  buffer4[i] = (byte) b;
              }
  
              position = 0;
              if (i == 0) {
                  numSigBytes = 0;
                  return -1;
              }
              try {
                  numSigBytes = Base64.decode4to3(buffer4, i, buffer3, 0, decodabet);
              } catch (IllegalArgumentException e) {
                  throw new IOException(e.getMessage(), e);
              }
          }   // end else: get data
  
          // Got data?
          if (position >= numSigBytes) {
              return -1;
          }
  
          int b = buffer3[position++] & 0xFF;
  
          if (position >= 3) {
              position = -1;
              numSigBytes = 0;
          }
  
          return b;
      }