Examples of openStream()


Examples of org.jboss.osgi.testing.OSGiManifestBuilder.openStream()

        // Add or replace the manifest in the archive
        appArchive.delete(ArchivePaths.create(JarFile.MANIFEST_NAME));
        appArchive.add(new Asset() {
            public InputStream openStream() {
                return builder.openStream();
            }
        }, JarFile.MANIFEST_NAME);
    }

    private void addImportsForClass(OSGiManifestBuilder builder, Class<?> javaClass) {

Examples of org.jboss.shrinkwrap.api.asset.Asset.openStream()

            FileOutputStream fos = null;
            InputStream is = null;
            try
            {
               fos = new FileOutputStream(target);
               is = asset.openStream();
               Streams.write(is, fos);
            }
            finally
            {
               Streams.closeQuietly(is);

Examples of org.jboss.vfs.VirtualFile.openStream()

         }
        
         VirtualFile ejbjar = unit.getMetaDataFile("ejb-jar.xml");
         if (ejbjar != null)
         {
            InputStream is = ejbjar.openStream();
            boolean has30EjbJarXml = has30EjbJarXml(is);
            is.close();
            if (!has30EjbJarXml) {
               return;
            }

Examples of org.jboss.virtual.VirtualFile.openStream()

    }
    VirtualFile file =this.files.get(path);
    if (file == null) {
      throw new IOException(RuntimePlugin.Util.getString("udf_model_not_found", name)); //$NON-NLS-1$
    }
    List<FunctionMethod> udfMethods = FunctionMetadataReader.loadFunctionMethods(file.openStream());
    ActivityReport<ReportItem> report = new ActivityReport<ReportItem>("UDF load"); //$NON-NLS-1$
    FunctionMetadataValidator.validateFunctionMethods(udfMethods,report);
    if(report.hasItems()) {
        throw new QueryMetadataException(QueryPlugin.Util.getString("ERR.015.001.0005", report)); //$NON-NLS-1$
    }

Examples of org.jboss.virtual.VirtualFile.openStream()

      final VirtualFile f = getFile(resourcePath);
      if (f == null) {
        return null;
      }
    try {
      return ObjectConverterUtil.convertToByteArray(f.openStream());
    } catch (IOException e) {
      throw new TeiidComponentException(e);
    }
    }
   

Examples of org.jboss.virtual.spi.VirtualFileHandler.openStream()

   public void testOpenStream() throws Exception
   {
      VFSContext context = getVFSContext("simple");
      VirtualFileHandler root = context.getRoot();
      VirtualFileHandler child = context.findChild(root, "child");
      InputStream stream = child.openStream();
      try
      {
         byte[] contents = new byte[10];
         int read = stream.read(contents);
         int total = 0;

Examples of org.jclouds.io.Payload.openStream()

         // exercise create data object with none cdmi put with payload string.
         value = "Hello CDMI World non-cdmi String";
         dataNonCDMIContentTypeApi.create(dataObjectNameIn, value);
         payloadOut = dataNonCDMIContentTypeApi.getValue(dataObjectNameIn);
         assertNotNull(payloadOut);
         assertEquals(Strings2.toStringAndClose(payloadOut.openStream()), value);

         payloadIn = newPayload(value);
         payloadIn.setContentMetadata(BaseMutableContentMetadata.fromContentMetadata(payloadIn.getContentMetadata()
                  .toBuilder().contentType(MediaType.PLAIN_TEXT_UTF_8.toString()).build()));
         dataNonCDMIContentTypeApi.create(dataObjectNameIn, payloadIn);

Examples of org.mozilla.javascript.tools.debugger.Main.openStream()

    public void go(final XScriptContext xsctxt, InputStream in) {
        Main sdb = initUI(xsctxt);

        // Open a stream in the debugger
        sdb.openStream(in);
    }

    // This code is based on the main method of the Rhino Debugger Main class
    // We pass in the XScriptContext in the global scope for script execution
    private Main initUI(final XScriptContext xsctxt) {

Examples of org.rssowl.core.connection.IProtocolHandler.openStream()

        properties.put(IConnectionPropertyConstants.HEADERS, headers);
        properties.put(IConnectionPropertyConstants.POST, Boolean.TRUE);

        BufferedReader reader = null;
        try {
          InputStream inS = handler.openStream(uri, monitor, properties);
          reader = new BufferedReader(new InputStreamReader(inS));
          String line;
          while (!monitor.isCanceled() && (line = reader.readLine()) != null) {
            if (line.startsWith(AUTH_IDENTIFIER))
              return line.substring(AUTH_IDENTIFIER.length());

Examples of org.slim3.controller.upload.FileItemStream.openStream()

            FileUpload upload = createFileUpload();
            FileItemIterator iter = upload.getItemIterator(request);
            while (iter.hasNext()) {
                FileItemStream item = iter.next();
                String name = item.getFieldName();
                InputStream stream = item.openStream();
                if (item.isFormField()) {
                    String value =
                        normalizeValue(Streams.asString(stream, request
                            .getCharacterEncoding()));
                    if (name.endsWith(ARRAY_SUFFIX)) {
TOP
Copyright © 2018 www.massapi.com. 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.