public int read(byte[] buf, int offset, int length) throws IOException { try { return readContents(buf, offset, length); } catch (SVNException svne) { throw new IOException(svne.getMessage()); } }
public int read(byte[] buf, int offset, int length) throws IOException { try { return readContents(buf, offset, length); } catch (SVNException svne) { throw new IOException(svne.getMessage()); } }
public int read(byte[] buf, int offset, int length) throws IOException { try { return readContents(buf, offset, length); } catch (SVNException svne) { throw new IOException(svne.getMessage()); } }
public static void truncate(File file, long truncateToSize) throws IOException { RandomAccessFile raf = null; try { raf = openRAFileForWriting(file, false); raf.setLength(truncateToSize); } catch (SVNException e) { throw (IOException) new IOException(e.getMessage()).initCause(e); } finally { closeFile(raf); } }
public static void truncate(File file, long truncateToSize) throws IOException { RandomAccessFile raf = null; try { raf = openRAFileForWriting(file, false); raf.setLength(truncateToSize); } catch (SVNException e) { throw (IOException) new IOException(e.getMessage()).initCause(e); } finally { closeFile(raf); } }
public void close() throws IOException { os.close(); File baseFile = getBaseFile(myName, false); try { SVNFileUtil.rename(myTmpFile, baseFile); } catch (SVNException e) { throw new IOException(e.getMessage()); } SVNFileUtil.setReadonly(baseFile, true); } };
public void close() throws IOException { os.close(); File baseFile = getBaseFile(myName, false); try { SVNFileUtil.rename(myTmpFile, baseFile); } catch (SVNException e) { throw new IOException(e.getMessage()); } SVNFileUtil.setReadonly(baseFile, true); } };
public void close() throws IOException { os.close(); File baseFile = getBaseFile(myName, false); try { SVNFileUtil.rename(myTmpFile, baseFile); } catch (SVNException e) { throw new IOException(e.getMessage()); } SVNFileUtil.setReadonly(baseFile, true); } };
public void close() throws IOException { os.close(); File baseFile = getBaseFile(myName, false); try { SVNFileUtil.rename(myTmpFile, baseFile); } catch (SVNException e) { throw new IOException(e.getMessage()); } SVNFileUtil.setReadonly(baseFile, true); } };
public void write(byte b[], int off, int len) throws IOException { try { SVNConnection.this.write("(w(s", myPrefix); getOutputStream().write((String.valueOf(len)).getBytes("UTF-8")); getOutputStream().write(':'); getOutputStream().write(b, off, len); getOutputStream().write(' '); SVNConnection.this.write("))", null); } catch (SVNException e) { throw new IOException(e.getMessage()); } }
public void write(byte b[], int off, int len) throws IOException { try { SVNConnection.this.write("(w(s", myPrefix); getOutputStream().write((String.valueOf(len)).getBytes("UTF-8")); getOutputStream().write(':'); getOutputStream().write(b, off, len); getOutputStream().write(' '); SVNConnection.this.write("))", null); } catch (SVNException e) { throw new IOException(e.getMessage()); } }
public void write(byte[] b, int off, int len) throws IOException { try { myConnection.write("(w(s", myPrefix); myConnection.getOutputStream().write((len + "").getBytes("UTF-8")); myConnection.getOutputStream().write(':'); myConnection.getOutputStream().write(b, off, len); myConnection.getOutputStream().write(' '); myConnection.write("))", null); } catch (SVNException e) { throw new IOException(e.getMessage()); } }
public static String urlFromWorkspace(FileNode workspace) throws IOException { SVNClientManager clientManager; clientManager = SVNClientManager.newInstance(SVNWCUtil.createDefaultOptions(true)); try { return clientManager.getWCClient().doInfo(workspace.toPath().toFile(), SVNRevision.UNDEFINED).getURL().toString(); } catch (SVNException e) { throw new IOException("cannot determine workspace url: " + e.getMessage(), e); } finally { clientManager.dispose(); } } }
public static void closeRepository(FSFS fsfs) { if (fsfs != null) { try { fsfs.close(); } catch (SVNException e) { SVNDebugLog.getDefaultLog().logFine(SVNLogType.FSFS, e); SVNDebugLog.getDefaultLog().logFine(SVNLogType.FSFS, e.getMessage()); } } }
public static void closeRepository(FSFS fsfs) { if (fsfs != null) { try { fsfs.close(); } catch (SVNException e) { SVNDebugLog.getDefaultLog().logFine(SVNLogType.FSFS, e); SVNDebugLog.getDefaultLog().logFine(SVNLogType.FSFS, e.getMessage()); } } }
public static void closeRepository(FSFS fsfs) { if (fsfs != null) { try { fsfs.close(); } catch (SVNException e) { SVNDebugLog.getDefaultLog().logFine(SVNLogType.FSFS, e); SVNDebugLog.getDefaultLog().logFine(SVNLogType.FSFS, e.getMessage()); } } }
@Override public URI getUri() { SVNURL svnurl; svnurl = getSvnurl(); try { svnurl = SVNURL.create(svnurl.getProtocol(), null, svnurl.getHost(), svnurl.hasPort() ? svnurl.getPort() : -1, svnurl.getPath(), false); } catch (SVNException e) { throw new IllegalStateException(e.getMessage(), e); } return URI.create(root.getFilesystem().getScheme() + ":" + svnurl.toString()); }
public static void throwException(SVNException e, SVNClientImpl svnClient) throws ClientException { int code = 0; if (e.getErrorMessage() != null) { code = e.getErrorMessage().getErrorCode().getCode(); } ClientException ec = new ClientException(e.getMessage(), null, code); ec.initCause(e); svnClient.getDebugLog().logFine(SVNLogType.DEFAULT, ec); svnClient.getDebugLog().logFine(SVNLogType.DEFAULT, e); throw ec; }
public static void throwException(SVNException e, SVNClientImpl svnClient) throws ClientException { int code = 0; if (e.getErrorMessage() != null) { code = e.getErrorMessage().getErrorCode().getCode(); } ClientException ec = new ClientException(e.getMessage(), null, code); ec.initCause(e); svnClient.getDebugLog().logFine(SVNLogType.DEFAULT, ec); svnClient.getDebugLog().logFine(SVNLogType.DEFAULT, e); throw ec; }
public static void throwException(SVNException e, SVNClientImpl svnClient) throws ClientException { int code = 0; if (e.getErrorMessage() != null) { code = e.getErrorMessage().getErrorCode().getCode(); } ClientException ec = new ClientException(e.getMessage(), "", code); svnClient.getClientManager().getDebugLog().info(ec); svnClient.getClientManager().getDebugLog().info(e); throw ec; } }