code: private Matrix loadBinary(InputStream fileStream) throws IOException {
          DataInputStream dis = new DataInputStream(fileStream);
          int rows = dis.readInt();
          int cols = dis.readInt();
  
          // create a dense matrix
          Matrix m = new ArrayMatrix(rows, cols);
          double[] d = new double[cols];
          for (int row = 0; row < rows; ++row) {
              String word = dis.readUTF();
              termToIndex.put(word, row);
  
              for (int col = 0; col < cols; ++col) {
                  d[col] = dis.readDouble();
              }
              m.setRow(row, d);
          }
          return m;
      }
docs: Loads the {@link SemanticSpace} from the binary formatted file, adding
  its words to {@link #termToIndex} and returning the {@code Matrix}
  containing the space's vectors.
  
  @param sspaceFile a file in {@link SSpaceFormat#BINARY binary} format