docs: private static void readFully(final DataInput input, final short[] shorts) throws IOException {
          if (input instanceof ImageInputStream) {
              // Optimization for ImageInputStreams, read all in one go
              ((ImageInputStream) input).readFully(shorts, 0, shorts.length);
          }
          else {
              for (int i = 0; i < shorts.length; i++) {
                  shorts[i] = input.readShort();
              }
          }
      }