class ByteArrayResource implements Resource {

    @Override
    public URL getResource(String location) {
        URL result = null;
        if (location != null && location.equals(this.location)) {
            try {
                result = new URL(null, "bytes://" + location,
                        new ByteArrayResourceURLStreamHandler(this));
            } catch (MalformedURLException mue) {
            }
        }
        return result;
    }

    public  ByteArrayResource(String location, byte[] bytes);

}