code: protected X509Credential createObject(GlobusResource certSource, GlobusResource keySource)
              throws ResourceStoreException {
          InputStream certIns;
          InputStream keyIns;
          try {
              certIns = certSource.getInputStream();
              keyIns = keySource.getInputStream();
              return new X509Credential(certIns, keyIns);
          } catch (FileNotFoundException e) {
              throw new ResourceStoreException(e);
          } catch (CredentialException e) {
              throw new ResourceStoreException(e);
          } catch (IOException ioe) {
              throw new ResourceStoreException(ioe);
          }
      }
docs: for creation of credential from a file