code: private void setData(InputStream dataStream) throws IOException {
          ByteArrayOutputStream out = new ByteArrayOutputStream();
          try {
              for (;;) {
                  int data = dataStream.read();
                  if (data < 0) {
                      break;
                  }
                  out.write(data);
              }
              setData(out.toByteArray());
          } finally {
              try {
                  dataStream.close();
              } catch (IOException e) {
                  // Ignore.
              }
          }
      }
docs: Sets the data which contains the key store.
  
  @param dataStream the {@link InputStream} that contains the key store