Code example for DefaultHandler

		InputStream is = cipherTransformer.createInputStream(new ByteArrayInputStream(encryptedData));
		SAXParserFactory factory = SAXParserFactory.newInstance();
		SAXParser saxParser = factory.newSAXParser();
		saxParser.parse(is, new DefaultHandler());	
		// Success if it does not throw an exception 
		// Regular CipherInputStream does NOT work with GCM mode 
		// GcmCompatibleCipherInputStream fixes this! 
		// See 
		// and 
	private void doTestEncryption(List<CipherSpec> cipherSpecs) throws InvalidKeySpecException, NoSuchAlgorithmException, IOException, CipherException, InvalidKeyException {
		Transformer encryptCipherTransformer = new CipherTransformer(cipherSpecs, masterKey);
		Transformer decryptCipherTransformer = new CipherTransformer(cipherSpecs, masterKey);
Contextual code suggestions in your IDE  Get Codota for Java