private static String readResource(String name) {
        try {
            return IOUtils.toString(AmazonKinesisFirehoseToRedshiftSample.class.getResourceAsStream(name));
        } catch (IOException e) {
            throw new RuntimeException("Failed to read document resource: " + name, e);
        }
    }
Method to read the resource for the given filename.

@param name the file name
@return the input stream as string
src/samples/AmazonKinesisFirehose/AbstractAmazonKinesisFirehoseDelivery.java