code: @Override
     public byte[] getAsByteArray() throws IllegalStateException, IOException
     {
        if (url != null)
        {
           if (tempFile != null)
           {
              return fileToByteArray(tempFile);
           }
           else if (spoolContent)
           {
              spoolContent();
              return fileToByteArray(tempFile);
           }
           ByteArrayOutputStream baos = new ByteArrayOutputStream();
           InputStream is = url.openStream();
           try
           {
              byte[] bytes = new byte[1024];
              int length;
              while ((length = is.read(bytes)) != -1)
              {
                 baos.write(bytes, 0, length);
              }
              return baos.toByteArray();
           }
           finally
           {
              is.close();
           }
        }
        return super.getAsByteArray();
     }
docs: {@inheritDoc}