Skip to content

Instantly share code, notes, and snippets.

@singhgurjeet
Created December 23, 2011 01:31
Show Gist options
  • Save singhgurjeet/1512679 to your computer and use it in GitHub Desktop.
Save singhgurjeet/1512679 to your computer and use it in GitHub Desktop.
protected long uploadGraph(ErgGraph graph) throws IOException {
try {
InputStream stream = ErgSerializer.serializeErgGraph(graph);
return filesClient.uploadAsFile(stream, graph.getErgID() + "", null).get().getFileId();
} catch (Exception e) {
throw new IOException("Unable to cache ErgGraph");
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment