@SuppressWarnings("unchecked") public static BucketReferer parseGetBucketReferer(InputStream responseBody) throws ResponseParseException {
  try {
    Element root=getXmlRootElement(responseBody);
    boolean allowEmptyReferer=Boolean.valueOf(root.getChildText("AllowEmptyReferer"));
    List<String> refererList=new ArrayList<String>();
    if (root.getChild("RefererList") != null) {
      Element refererListElem=root.getChild("RefererList");
      List<Element> refererElems=refererListElem.getChildren("Referer");
      if (refererElems != null && !refererElems.isEmpty()) {
        for (        Element e : refererElems) {
          refererList.add(e.getText());
        }
      }
    }
    return new BucketReferer(allowEmptyReferer,refererList);
  }
 catch (  Exception e) {
    throw new ResponseParseException(e.getMessage(),e);
  }
}

@ SuppressWarnings ( "unchecked" ) public static BucketReferer parseGetBucketReferer ( InputStream responseBody ) throws ResponseParseException { try { Element root = getXmlRootElement ( responseBody ) ; boolean allowEmptyReferer = Boolean . valueOf ( root . getChildText ( "AllowEmptyReferer" ) ) ; List < String > refererList = new ArrayList < String > ( ) ; if ( root . getChild ( "RefererList" ) != null ) { Element refererListElem = root . getChild ( "RefererList" ) ; List < Element > refererElems = refererListElem . getChildren ( "Referer" ) ; if ( refererElems != null && ! refererElems . isEmpty ( ) ) { for ( Element e : refererElems ) { refererList . add ( e . getText ( ) ) ; } } } return new BucketReferer ( allowEmptyReferer , refererList ) ; } catch ( Exception e ) { throw new ResponseParseException ( e . getMessage ( ) , e ) ; } }
unmarshall get bucket referer response body to bucket referer list .
