ClientBase.java revision 2265cfe8ee36d40dc946cde472ecd12c61f856b2
/**
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS HEADER.
*
* Copyright (c) 2008 Sun Microsystems Inc. All Rights Reserved
*
* The contents of this file are subject to the terms
* of the Common Development and Distribution License
* (the License). You may not use this file except in
* compliance with the License.
*
* You can obtain a copy of the License at
* See the License for the specific language governing
* permission and limitations under the License.
*
* When distributing Covered Code, include this CDDL
* Header Notice in each file and include the License file
* at opensso/legal/CDDLv1.0.txt.
* If applicable, add the following below the CDDL Header,
* with the fields enclosed by brackets [] replaced by
* your own identifying information:
* "Portions Copyrighted [year] [name of copyright owner]"
*
* $Id: ClientBase.java,v 1.1 2008/11/22 02:41:19 ak138937 Exp $
*
*/
/*
* Portions Copyrighted 2011-2014 ForgeRock AS
*/
/**
* This is the base class for <code>Client</code> related cases.
* Any class that needs client specific methods can use this base
* class.
*/
try {
} catch (Exception e) {
//URL is Malformed
"ClientBase.getBaseUrlStr: " +
"URL Malformed Exception", e);
}
return base;
}
}
if (idx != -1) {
}
}
throws Exception {
return bootProp;
}
throws Exception {
try {
instream = new BufferedInputStream(
new FileInputStream(fName));
throw ex;
} finally {
try {
// No handling required
}
}
}
return result;
}
public RESTResponse callServiceURL(
) throws MalformedURLException, IOException {
try {
urlConnect.setDoOutput(true);
urlConnect.setUseCaches(false);
// send(post) data
// read response
urlConnect.getInputStream()));
}
throw ex;
} catch (IOException ex) {
}
"ClientBase.callServiceURL: " +
"IOException from server", ex);
} finally {
}
}
}
return response;
}
int nHeaderNumber = 1;
}
nHeaderNumber)) != null) {
}
} else {
nHeaderNumber)) != null) {
}
}
return headers;
}
while (st.hasMoreTokens()) {
continue;
}
if (idx != -1){
} else {
attrVal = "";
}
}
}
return result;
}
) {
return;
}
}
int idx1 = -1;
int idx2 = -1;
return; // has no property to set
}
return;
}
public class RESTResponse {
private int responseCode = -1;
public ArrayList getContent() {
return content;
}
}
public int getResponseCode() {
return responseCode;
}
public void setResponseCode(int responseCode) {
this.responseCode = responseCode;
}
buffer = new StringBuffer();
}
}
}
}
char[] decryptedPasswd = new char[1024];
keystr);
}
}