Package org.bladerunnerjs.plugin

Examples of org.bladerunnerjs.plugin.BinaryResponseContent


            throw new ContentProcessingException("The requested unbundled resource at '"+requestedFilePathRelativeToRoot+"' does not exist or is not a file.");
          }
       
          ByteArrayOutputStream outputBuffer = new ByteArrayOutputStream();
          contentAccessor.handleRequest(requestedFilePathRelativeToApp, outputBuffer);
          return new BinaryResponseContent( new ByteArrayInputStream(outputBuffer.toByteArray()) );
        }
      else {
        throw new ContentProcessingException("unknown request form '" + contentPath.formName + "'.");
      }
    }
View Full Code Here


    {
      if (fileIgnoredByBrjsConfig(resourceFile)) {
        String relativePath = RelativePathUtility.get(brjs.getFileInfoAccessor(), brjs.dir(), resourceFile);
        throw new FileNotFoundException("The file at '"+relativePath+"' is ignored by the BRJS configuration so cannot be served");
      }
      return new BinaryResponseContent( new FileInputStream(resourceFile) )
    }
    catch (FileNotFoundException | ConfigException ex)
    {
      throw new ContentProcessingException(ex);
    }
View Full Code Here

TOP

Related Classes of org.bladerunnerjs.plugin.BinaryResponseContent

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.