Class XmlResponsesSaxParser
- java.lang.Object
-
- com.amazonaws.services.s3.model.transform.XmlResponsesSaxParser
-
public class XmlResponsesSaxParser extends Object
XML Sax parser to read XML documents returned by S3 via the REST interface, converting these documents into objects.
-
-
Nested Class Summary
-
Constructor Summary
Constructors Constructor Description XmlResponsesSaxParser()
Constructs the XML SAX parser.
-
Method Summary
-
-
-
Method Detail
-
parseXmlInputStream
protected void parseXmlInputStream(DefaultHandler handler, InputStream inputStream) throws IOException
Parses an XML document from an input stream using a document handler.- Parameters:
handler
- the handler for the XML documentinputStream
- an input stream containing the XML document to parse- Throws:
IOException
- on error reading from the input stream (ie connection reset)com.amazonaws.SdkClientException
- on error with malformed XML, etc
-
sanitizeXmlDocument
protected InputStream sanitizeXmlDocument(DefaultHandler handler, InputStream inputStream) throws IOException
- Throws:
IOException
-
parseListBucketObjectsResponse
public XmlResponsesSaxParser.ListBucketHandler parseListBucketObjectsResponse(InputStream inputStream, boolean shouldSDKDecodeResponse) throws IOException
Parses a ListBucket response XML document from an input stream.- Parameters:
inputStream
- XML data input stream.- Returns:
- the XML handler object populated with data parsed from the XML stream.
- Throws:
com.amazonaws.SdkClientException
IOException
-
parseListObjectsV2Response
public XmlResponsesSaxParser.ListObjectsV2Handler parseListObjectsV2Response(InputStream inputStream, boolean shouldSDKDecodeResponse) throws IOException
Parses a ListBucketV2 response XML document from an input stream.- Parameters:
inputStream
- XML data input stream.- Returns:
- the XML handler object populated with data parsed from the XML stream.
- Throws:
com.amazonaws.SdkClientException
IOException
-
parseListVersionsResponse
public XmlResponsesSaxParser.ListVersionsHandler parseListVersionsResponse(InputStream inputStream, boolean shouldSDKDecodeResponse) throws IOException
Parses a ListVersions response XML document from an input stream.- Parameters:
inputStream
- XML data input stream.- Returns:
- the XML handler object populated with data parsed from the XML stream.
- Throws:
com.amazonaws.SdkClientException
IOException
-
parseListMyBucketsResponse
public XmlResponsesSaxParser.ListAllMyBucketsHandler parseListMyBucketsResponse(InputStream inputStream) throws IOException
Parses a ListAllMyBuckets response XML document from an input stream.- Parameters:
inputStream
- XML data input stream.- Returns:
- the XML handler object populated with data parsed from the XML stream.
- Throws:
com.amazonaws.SdkClientException
IOException
-
parseAccessControlListResponse
public XmlResponsesSaxParser.AccessControlListHandler parseAccessControlListResponse(InputStream inputStream) throws IOException
Parses an AccessControlListHandler response XML document from an input stream.- Parameters:
inputStream
- XML data input stream.- Returns:
- the XML handler object populated with data parsed from the XML stream.
- Throws:
com.amazonaws.SdkClientException
IOException
-
parseLoggingStatusResponse
public XmlResponsesSaxParser.BucketLoggingConfigurationHandler parseLoggingStatusResponse(InputStream inputStream) throws IOException
Parses a LoggingStatus response XML document for a bucket from an input stream.- Parameters:
inputStream
- XML data input stream.- Returns:
- the XML handler object populated with data parsed from the XML stream.
- Throws:
com.amazonaws.SdkClientException
IOException
-
parseBucketLifecycleConfigurationResponse
public XmlResponsesSaxParser.BucketLifecycleConfigurationHandler parseBucketLifecycleConfigurationResponse(InputStream inputStream) throws IOException
- Throws:
IOException
-
parseBucketCrossOriginConfigurationResponse
public XmlResponsesSaxParser.BucketCrossOriginConfigurationHandler parseBucketCrossOriginConfigurationResponse(InputStream inputStream) throws IOException
- Throws:
IOException
-
parseBucketLocationResponse
public String parseBucketLocationResponse(InputStream inputStream) throws IOException
- Throws:
IOException
-
parseVersioningConfigurationResponse
public XmlResponsesSaxParser.BucketVersioningConfigurationHandler parseVersioningConfigurationResponse(InputStream inputStream) throws IOException
- Throws:
IOException
-
parseWebsiteConfigurationResponse
public XmlResponsesSaxParser.BucketWebsiteConfigurationHandler parseWebsiteConfigurationResponse(InputStream inputStream) throws IOException
- Throws:
IOException
-
parseReplicationConfigurationResponse
public XmlResponsesSaxParser.BucketReplicationConfigurationHandler parseReplicationConfigurationResponse(InputStream inputStream) throws IOException
- Throws:
IOException
-
parseTaggingConfigurationResponse
public XmlResponsesSaxParser.BucketTaggingConfigurationHandler parseTaggingConfigurationResponse(InputStream inputStream) throws IOException
- Throws:
IOException
-
parseAccelerateConfigurationResponse
public XmlResponsesSaxParser.BucketAccelerateConfigurationHandler parseAccelerateConfigurationResponse(InputStream inputStream) throws IOException
- Throws:
IOException
-
parseDeletedObjectsResult
public XmlResponsesSaxParser.DeleteObjectsHandler parseDeletedObjectsResult(InputStream inputStream) throws IOException
- Throws:
IOException
-
parseCopyObjectResponse
public XmlResponsesSaxParser.CopyObjectResultHandler parseCopyObjectResponse(InputStream inputStream) throws IOException
- Throws:
IOException
-
parseCompleteMultipartUploadResponse
public XmlResponsesSaxParser.CompleteMultipartUploadHandler parseCompleteMultipartUploadResponse(InputStream inputStream) throws IOException
- Throws:
IOException
-
parseInitiateMultipartUploadResponse
public XmlResponsesSaxParser.InitiateMultipartUploadHandler parseInitiateMultipartUploadResponse(InputStream inputStream) throws IOException
- Throws:
IOException
-
parseListMultipartUploadsResponse
public XmlResponsesSaxParser.ListMultipartUploadsHandler parseListMultipartUploadsResponse(InputStream inputStream) throws IOException
- Throws:
IOException
-
parseListPartsResponse
public XmlResponsesSaxParser.ListPartsHandler parseListPartsResponse(InputStream inputStream) throws IOException
- Throws:
IOException
-
parseObjectTaggingResponse
public XmlResponsesSaxParser.GetObjectTaggingHandler parseObjectTaggingResponse(InputStream inputStream) throws IOException
- Throws:
IOException
-
parseGetBucketMetricsConfigurationResponse
public XmlResponsesSaxParser.GetBucketMetricsConfigurationHandler parseGetBucketMetricsConfigurationResponse(InputStream inputStream) throws IOException
- Throws:
IOException
-
parseListBucketMetricsConfigurationsResponse
public XmlResponsesSaxParser.ListBucketMetricsConfigurationsHandler parseListBucketMetricsConfigurationsResponse(InputStream inputStream) throws IOException
- Throws:
IOException
-
parseGetBucketAnalyticsConfigurationResponse
public XmlResponsesSaxParser.GetBucketAnalyticsConfigurationHandler parseGetBucketAnalyticsConfigurationResponse(InputStream inputStream) throws IOException
- Throws:
IOException
-
parseListBucketAnalyticsConfigurationResponse
public XmlResponsesSaxParser.ListBucketAnalyticsConfigurationHandler parseListBucketAnalyticsConfigurationResponse(InputStream inputStream) throws IOException
- Throws:
IOException
-
parseGetBucketInventoryConfigurationResponse
public XmlResponsesSaxParser.GetBucketInventoryConfigurationHandler parseGetBucketInventoryConfigurationResponse(InputStream inputStream) throws IOException
- Throws:
IOException
-
parseBucketListInventoryConfigurationsResponse
public XmlResponsesSaxParser.ListBucketInventoryConfigurationsHandler parseBucketListInventoryConfigurationsResponse(InputStream inputStream) throws IOException
- Throws:
IOException
-
parseRequestPaymentConfigurationResponse
public XmlResponsesSaxParser.RequestPaymentConfigurationHandler parseRequestPaymentConfigurationResponse(InputStream inputStream) throws IOException
- Parameters:
inputStream
-- Returns:
- true if the bucket's is configured as Requester Pays, false if it is configured as Owner pays.
- Throws:
com.amazonaws.SdkClientException
IOException
-
-