private static SVNLock readLock(InputStream is) throws SVNException { Object[] items = SVNReader.parse(is, "(SSS(?S)S(?S))", new Object[6]); String path = (String) items[0]; String id = (String) items[1]; String owner = (String) items[2]; String comment = (String) items[3]; String creationDate = (String) items[4]; String expirationDate = (String) items[5]; Date created = creationDate != null ? SVNTimeUtil.parseDate(creationDate) : null; Date expires = expirationDate != null ? SVNTimeUtil .parseDate(expirationDate) : null; return new SVNLock(path, id, owner, comment, created, expires); }
public List read(String template, List items, boolean readMalformedData) throws SVNException { try { checkConnection(); return SVNReader.parse(getInputStream(), template, items); } catch (SVNException e) { handleIOError(e, readMalformedData); return null; } finally { myRepository.getDebugLog().flushStream(myLoggingInputStream); } }
public List read(String template, List items, boolean readMalformedData) throws SVNException { try { checkConnection(); return SVNReader.parse(getInputStream(), template, items); } catch (SVNException e) { handleIOError(e, readMalformedData); return null; } finally { myRepository.getDebugLog().flushStream(myLoggingInputStream); } }
public List read(String template, List items, boolean readMalformedData) throws SVNException { try { checkConnection(); return SVNReader.parse(getInputStream(), template, items); } catch (SVNException e) { handleIOError(e, readMalformedData); return null; } finally { myRepository.getDebugLog().flushStream(myLoggingInputStream); } }
public Object[] read(String template, Object[] items, boolean readMalformedData) throws SVNException { try { checkConnection(); return SVNReader.parse(getInputStream(), template, items); } catch (SVNException e) { if (readMalformedData && e.getErrorMessage().getErrorCode() == SVNErrorCode.RA_SVN_MALFORMED_DATA) { // read let's say next 255 bytes into the logging stream. byte[] malfored = new byte[1024]; try { // could it hang here for timeout? System.out.println("reading malformed data"); getInputStream().read(malfored); } catch (IOException e1) { // ignore. } } throw e; } finally { myRepository.getDebugLog().flushStream(myLoggingInputStream); } }
Object[] items = SVNReader.parse(parameters, "(SB))", null); byte[] bytes = (byte[]) items[1]; myDeltaReader.nextWindow(bytes, 0, bytes.length, myFilePath, myEditor); Object[] items = SVNReader.parse(parameters, pattern, new Object[10]); if ("target-rev".equals(commandName)) { myEditor.targetRevision(SVNReader.getLong(items, 0));
List items = null; try { items = SVNReader.parse(is, "nnll", null); } finally { myRepository.getDebugLog().flushStream(myLoggingInputStream);
List items = null; try { items = SVNReader.parse(is, "nnll", null); } finally { myRepository.getDebugLog().flushStream(myLoggingInputStream);
List items = null; try { items = SVNReader.parse(is, "nnll", null); } finally { myRepository.getDebugLog().flushStream(myLoggingInputStream);
private static SVNDirEntry readStatEntry(InputStream is) throws SVNException { Object[] items = SVNReader.parse(is, "(WNTN(?S)(?S))", null); SVNNodeKind kind = SVNNodeKind.parseKind(SVNReader.getString(items, 0)); long size = SVNReader.getLong(items, 1); boolean hasProps = SVNReader.getBoolean(items, 2); long revision = SVNReader.getLong(items, 3); Date date = items[4] != null ? SVNTimeUtil.parseDate(SVNReader.getString(items, 4)) : null; String author = SVNReader.getString(items, 5); return new SVNDirEntry(null, null, kind, size, hasProps, revision, date, author); }
private static SVNDirEntry readDirEntry(InputStream is) throws SVNException { Object[] items = SVNReader.parse(is, "(SWNTN(?S)(?S))", null); String name = SVNReader.getString(items, 0); SVNNodeKind kind = SVNNodeKind.parseKind(SVNReader.getString(items, 1)); long size = SVNReader.getLong(items, 2); boolean hasProps = SVNReader.getBoolean(items, 3); long revision = SVNReader.getLong(items, 4); Date date = items[5] != null ? SVNTimeUtil.parseDate(SVNReader.getString(items, 5)) : null; String author = SVNReader.getString(items, 6); return new SVNDirEntry(null, name, kind, size, hasProps, revision, date, author); }