private OutputStream getOutputStream() throws IOException { if (myOutputStream == null) { if (mySocket == null) { return null; } myOutputStream = new BufferedOutputStream(mySocket.getOutputStream(), 2048); myOutputStream = myRepository.getDebugLog().createLogStream(SVNLogType.NETWORK, myOutputStream); } return myOutputStream; }
private OutputStream getOutputStream() throws IOException { if (myOutputStream == null) { if (mySocket == null) { return null; } myOutputStream = new BufferedOutputStream(mySocket.getOutputStream(), 2048); myOutputStream = myRepository.getDebugLog().createLogStream(SVNLogType.NETWORK, myOutputStream); } return myOutputStream; }
private OutputStream getOutputStream() throws IOException { if (myOutputStream == null) { if (mySocket == null) { return null; } myOutputStream = new BufferedOutputStream(mySocket.getOutputStream(), 2048); myOutputStream = myRepository.getDebugLog().createLogStream(myOutputStream); } return myOutputStream; }
protected synchronized void lock(boolean force) { try { synchronized(this) { if (Thread.currentThread() == myLocker) { if (!force) { getDebugLog().logFine(SVNLogType.DEFAULT, new Exception()); throw new Error("SVNRepository methods are not reenterable"); } myLockCount++; return; } while (myLocker != null) { wait(); } myLocker = Thread.currentThread(); myLockCount++; } } catch (InterruptedException e) { throw new Error("Interrupted attempt to aquire write lock"); } }
private OutputStream getOutputStream() throws IOException { SVNDebugLog.getDefaultLog().logFine(SVNLogType.DEFAULT, "socket output stream requested..."); if (myOutputStream == null) { if (mySocket == null) { return null; } myOutputStream = new BufferedOutputStream(mySocket.getOutputStream(), 2048); myOutputStream = myRepository.getDebugLog().createLogStream(SVNLogType.NETWORK, myOutputStream); } return myOutputStream; }
public void sendData(byte[] body) throws IOException { try { getOutputStream().write(body, 0, body.length); getOutputStream().flush(); } finally { myRepository.getDebugLog().flushStream(getOutputStream()); } }
public void sendData(byte[] body) throws IOException { try { getOutputStream().write(body, 0, body.length); getOutputStream().flush(); } finally { myRepository.getDebugLog().flushStream(getOutputStream()); } }
public void sendData(byte[] body) throws IOException { try { getOutputStream().write(body, 0, body.length); getOutputStream().flush(); } finally { myRepository.getDebugLog().flushStream(getOutputStream()); } }
public void sendData(byte[] body) throws IOException { try { getOutputStream().write(body, 0, body.length); getOutputStream().flush(); } finally { myRepository.getDebugLog().flushStream(getOutputStream()); } }
public void sendData(InputStream source, long length) throws IOException { try { byte[] buffer = getBuffer(); while(length > 0) { int read = source.read(buffer, 0, (int) Math.min(buffer.length, length)); if (read > 0) { length -= read; getOutputStream().write(buffer, 0, read); } else if (read < 0) { break; } } getOutputStream().flush(); } finally { myRepository.getDebugLog().flushStream(getOutputStream()); } }
public void sendData(InputStream source, long length) throws IOException { try { byte[] buffer = getBuffer(); while(length > 0) { int read = source.read(buffer, 0, (int) Math.min(buffer.length, length)); if (read > 0) { length -= read; getOutputStream().write(buffer, 0, read); } else if (read < 0) { break; } } getOutputStream().flush(); } finally { myRepository.getDebugLog().flushStream(getOutputStream()); } }
public void sendData(InputStream source, long length) throws IOException { try { byte[] buffer = getBuffer(); while(length > 0) { int read = source.read(buffer, 0, (int) Math.min(buffer.length, length)); length -= read; if (read > 0) { getOutputStream().write(buffer, 0, read); } else { break; } } getOutputStream().flush(); } finally { myRepository.getDebugLog().flushStream(getOutputStream()); } }
public void sendData(InputStream source, long length) throws IOException { try { byte[] buffer = getBuffer(); while(length > 0) { int read = source.read(buffer, 0, (int) Math.min(buffer.length, length)); if (read > 0) { length -= read; getOutputStream().write(buffer, 0, read); } else if (read < 0) { break; } } getOutputStream().flush(); } finally { myRepository.getDebugLog().flushStream(getOutputStream()); } }
public void readHeader(HTTPRequest request) throws IOException { InputStream is = myRepository.getDebugLog().createLogStream(getInputStream()); try { HTTPStatus status = HTTPParser.parseStatus(is); HTTPHeader header = HTTPHeader.parseHeader(is); request.setStatus(status); request.setResponseHeader(header); } catch (ParseException e) { // in case of parse exception: // try to read remaining and log it. String line = HTTPParser.readLine(is); while(line != null && line.length() > 0) { line = HTTPParser.readLine(is); } throw new IOException(e.getMessage()); } finally { myRepository.getDebugLog().flushStream(is); } }
public void readHeader(HTTPRequest request) throws IOException { InputStream is = myRepository.getDebugLog().createLogStream(SVNLogType.NETWORK, getInputStream()); try { // may throw EOF exception. HTTPStatus status = HTTPParser.parseStatus(is, myCharset); HTTPHeader header = HTTPHeader.parseHeader(is, myCharset); request.setStatus(status); request.setResponseHeader(header); } catch (ParseException e) { // in case of parse exception: // try to read remaining and log it. String line = HTTPParser.readLine(is, myCharset); while(line != null && line.length() > 0) { line = HTTPParser.readLine(is, myCharset); } throw new IOException(e.getMessage()); } finally { myRepository.getDebugLog().flushStream(is); } }
public void readHeader(HTTPRequest request) throws IOException { InputStream is = myRepository.getDebugLog().createLogStream(SVNLogType.NETWORK, getInputStream()); try { // may throw EOF exception. HTTPStatus status = HTTPParser.parseStatus(is, myCharset); HTTPHeader header = HTTPHeader.parseHeader(is, myCharset); request.setStatus(status); request.setResponseHeader(header); } catch (ParseException e) { // in case of parse exception: // try to read remaining and log it. String line = HTTPParser.readLine(is, myCharset); while(line != null && line.length() > 0) { line = HTTPParser.readLine(is, myCharset); } throw new IOException(e.getMessage()); } finally { myRepository.getDebugLog().flushStream(is); } }
public void readHeader(HTTPRequest request) throws IOException { InputStream is = myRepository.getDebugLog().createLogStream(SVNLogType.NETWORK, getInputStream()); try { // may throw EOF exception. HTTPStatus status = HTTPParser.parseStatus(is, myCharset); HTTPHeader header = HTTPHeader.parseHeader(is, myCharset); request.setStatus(status); request.setResponseHeader(header); } catch (ParseException e) { // in case of parse exception: // try to read remaining and log it. String line = HTTPParser.readLine(is, myCharset); while(line != null && line.length() > 0) { line = HTTPParser.readLine(is, myCharset); } throw new IOException(e.getMessage()); } finally { myRepository.getDebugLog().flushStream(is); } }
private SVNRepository getSourceRepository() throws SVNException { if (mySourceRepository == null) { mySourceRepository = SVNRepositoryFactory.create(myRepos.getLocation()); mySourceRepository.setAuthenticationManager(myRepos.getAuthenticationManager()); mySourceRepository.setDebugLog(myRepos.getDebugLog()); mySourceRepository.setTunnelProvider(myRepos.getTunnelProvider()); mySourceRepository.setCanceller(myRepos.getCanceller()); } return mySourceRepository; }
private SVNRepository getSourceRepository() throws SVNException { if (mySourceRepository == null) { mySourceRepository = SVNRepositoryFactory.create(myRepos.getLocation()); mySourceRepository.setAuthenticationManager(myRepos.getAuthenticationManager()); mySourceRepository.setDebugLog(myRepos.getDebugLog()); mySourceRepository.setTunnelProvider(myRepos.getTunnelProvider()); mySourceRepository.setCanceller(myRepos.getCanceller()); } return mySourceRepository; }
private SVNRepository getSourceRepository() throws SVNException { if (mySourceRepository == null) { mySourceRepository = SVNRepositoryFactory.create(myRepos.getLocation()); mySourceRepository.setAuthenticationManager(myRepos.getAuthenticationManager()); mySourceRepository.setDebugLog(myRepos.getDebugLog()); mySourceRepository.setTunnelProvider(myRepos.getTunnelProvider()); mySourceRepository.setCanceller(myRepos.getCanceller()); } return mySourceRepository; }