List of usage examples for org.eclipse.jgit.transport WalkRemoteObjectDatabase open
abstract FileStream open(String path) throws FileNotFoundException, IOException;
From source file:it.com.atlassian.labs.speakeasy.util.jgit.WalkFetchConnection.java
License:Eclipse Distribution License
private boolean downloadLooseObject(final AnyObjectId id, final String looseName, final WalkRemoteObjectDatabase remote) throws TransportException { try {/*w w w. ja va 2s .c o m*/ final byte[] compressed = remote.open(looseName).toArray(); verifyAndInsertLooseObject(id, compressed); return true; } catch (FileNotFoundException e) { // Not available in a loose format from this alternate? // Try another strategy to get the object. // recordError(id, e); return false; } catch (IOException e) { throw new TransportException(MessageFormat.format(JGitText.get().cannotDownload, id.name()), e); } }