myOwner = cdata.toString(); if (myIsBase64) { StringBuffer sb = SVNBase64.normalizeBase64(new StringBuffer(myOwner)); byte[] buffer = allocateBuffer(sb.length()); int length = SVNBase64.base64ToByteArray(sb, buffer); StringBuffer sb = SVNBase64.normalizeBase64(new StringBuffer(myComment)); byte[] buffer = allocateBuffer(sb.length()); int length = SVNBase64.base64ToByteArray(sb, buffer);
myOwner = cdata.toString(); if (myIsBase64) { StringBuffer sb = SVNBase64.normalizeBase64(new StringBuffer(myOwner)); byte[] buffer = allocateBuffer(sb.length()); int length = SVNBase64.base64ToByteArray(sb, buffer); StringBuffer sb = SVNBase64.normalizeBase64(new StringBuffer(myComment)); byte[] buffer = allocateBuffer(sb.length()); int length = SVNBase64.base64ToByteArray(sb, buffer);
myOwner = cdata.toString(); if (myIsBase64) { StringBuffer sb = SVNBase64.normalizeBase64(new StringBuffer(myOwner)); byte[] buffer = allocateBuffer(sb.length()); int length = SVNBase64.base64ToByteArray(sb, buffer); StringBuffer sb = SVNBase64.normalizeBase64(new StringBuffer(myComment)); byte[] buffer = allocateBuffer(sb.length()); int length = SVNBase64.base64ToByteArray(sb, buffer);
protected SVNPropertyValue createPropertyValueFromBase64(DAVElement element, String propertyName, StringBuffer cdata) { StringBuffer sb = SVNBase64.normalizeBase64(cdata); byte[] buffer = allocateBuffer(sb.length()); int length = SVNBase64.base64ToByteArray(sb, buffer); if (useStringProperty(element, propertyName)) { String str; try { str = new String(buffer, 0, length, "UTF-8"); } catch (UnsupportedEncodingException e) { str = new String(buffer, 0, length); } return SVNPropertyValue.create(str); } return SVNPropertyValue.create(propertyName, buffer, 0, length); }
public static String getAuthHeader(String token, SVNNTSecurityParameters params) throws SVNException { byte[] input = null; if (token != null) { StringBuffer tokenBuffer = new StringBuffer(token); byte[] tmp = new byte[tokenBuffer.length()]; StringBuffer sb = SVNBase64.normalizeBase64(tokenBuffer); int resultLength = SVNBase64.base64ToByteArray(sb, tmp); input = new byte[resultLength]; System.arraycopy(tmp, 0, input, 0, resultLength); } byte[] nextTokenBytes = getNextToken(params, input); if (nextTokenBytes == null) { SVNErrorMessage err = SVNErrorMessage.create(SVNErrorCode.IO_ERROR, "Internal authentication error"); SVNErrorManager.error(err, SVNLogType.DEFAULT); } return SVNBase64.byteArrayToBase64(nextTokenBytes); }
public static String getAuthHeader(String token, SVNNTSecurityParameters params) throws SVNException { byte[] input = null; if (token != null) { StringBuffer tokenBuffer = new StringBuffer(token); byte[] tmp = new byte[tokenBuffer.length()]; StringBuffer sb = SVNBase64.normalizeBase64(tokenBuffer); int resultLength = SVNBase64.base64ToByteArray(sb, tmp); input = new byte[resultLength]; System.arraycopy(tmp, 0, input, 0, resultLength); } byte[] nextTokenBytes = getNextToken(params, input); if (nextTokenBytes == null) { SVNErrorMessage err = SVNErrorMessage.create(SVNErrorCode.IO_ERROR, "Internal authentication error"); SVNErrorManager.error(err, SVNLogType.DEFAULT); } return SVNBase64.byteArrayToBase64(nextTokenBytes); }
protected void endElement(DAVElement parent, DAVElement element, StringBuffer cdata) throws SVNException { if (element == APPLY_TEXT_DELTA) { setDeltaProcessing(false); } else if (element == CHANGE_FILE_PROPERTY || element == CHANGE_DIR_PROPERTY) { if (cdata != null && !"".equals(cdata.toString()) && myPropertyName == null) { SVNErrorMessage err = SVNErrorMessage.create(SVNErrorCode.RA_DAV_MALFORMED_DATA, "Got cdata content for a prop delete"); SVNErrorManager.error(err, SVNLogType.NETWORK); } if (myPropertyName != null) { StringBuffer sb = SVNBase64.normalizeBase64(cdata); byte[] buffer = allocateBuffer(sb.length()); int length = SVNBase64.base64ToByteArray(sb, buffer); SVNPropertyValue property = SVNPropertyValue.create(myPropertyName, buffer, 0, length); if (element == CHANGE_FILE_PROPERTY) { myEditor.changeFileProperty(myPath, myPropertyName, property); } else { myEditor.changeDirProperty(myPropertyName, property); } } } } }
protected void endElement(DAVElement parent, DAVElement element, StringBuffer cdata) throws SVNException { if (element == APPLY_TEXT_DELTA) { setDeltaProcessing(false); } else if (element == CHANGE_FILE_PROPERTY || element == CHANGE_DIR_PROPERTY) { if (cdata != null && !"".equals(cdata.toString()) && myPropertyName == null) { SVNErrorMessage err = SVNErrorMessage.create(SVNErrorCode.RA_DAV_MALFORMED_DATA, "Got cdata content for a prop delete"); SVNErrorManager.error(err, SVNLogType.NETWORK); } if (myPropertyName != null) { StringBuffer sb = SVNBase64.normalizeBase64(cdata); byte[] buffer = allocateBuffer(sb.length()); int length = SVNBase64.base64ToByteArray(sb, buffer); SVNPropertyValue property = SVNPropertyValue.create(myPropertyName, buffer, 0, length); if (element == CHANGE_FILE_PROPERTY) { myEditor.changeFileProperty(myPath, myPropertyName, property); } else { myEditor.changeDirProperty(myPropertyName, property); } } } } }
value = SVNPropertyValue.create(cdata.toString()); } else if ("base64".equals(myEncoding)) { StringBuffer sb = SVNBase64.normalizeBase64(cdata); byte[] buffer = allocateBuffer(sb.length()); int length = SVNBase64.base64ToByteArray(sb, buffer);
value = SVNPropertyValue.create(cdata.toString()); } else if ("base64".equals(myEncoding)) { StringBuffer sb = SVNBase64.normalizeBase64(cdata); byte[] buffer = allocateBuffer(sb.length()); int length = SVNBase64.base64ToByteArray(sb, buffer);
StringBuffer sb = SVNBase64.normalizeBase64(new StringBuffer(encryptedData)); int decodedBytes = SVNBase64.base64ToByteArray(sb, buffer); byte[] decodedBuffer = new byte[decodedBytes];
StringBuffer sb = SVNBase64.normalizeBase64(cdata); byte[] buffer = allocateBuffer(sb.length()); int length = SVNBase64.base64ToByteArray(sb, buffer);
value = SVNPropertyValue.create(cdata.toString()); } else if ("base64".equals(myEncoding)) { StringBuffer sb = SVNBase64.normalizeBase64(cdata); byte[] buffer = allocateBuffer(sb.length()); int length = SVNBase64.base64ToByteArray(sb, buffer);
StringBuffer sb = SVNBase64.normalizeBase64(cdata); byte[] buffer = allocateBuffer(sb.length()); int length = SVNBase64.base64ToByteArray(sb, buffer);
value = SVNPropertyValue.create(cdata.toString()); } else if ("base64".equals(myEncoding)) { StringBuffer sb = SVNBase64.normalizeBase64(cdata); byte[] buffer = allocateBuffer(sb.length()); int length = SVNBase64.base64ToByteArray(sb, buffer);
encryptedData = SVNBase64.normalizeBase64(encryptedData); int decodedBytes = SVNBase64.base64ToByteArray(encryptedData, buffer); byte[] decodedBuffer = new byte[decodedBytes];