Examples of openStream()


Examples of java.net.URL.openStream()

      URL configFile =
        SimpleCommandSet.class.getResource("/org/quickserver/net/qsadmin/gui/conf/MainCommandPanel.xml");
      if(configFile==null)
        throw new RuntimeException("XML File not found : "+"MainCommandPanel.xml");

      InputStream input = configFile.openStream();
      logger.fine("Loading command config from xml file : " + input);
      sms = (SimpleCommandSet) digester.parse(input);     
    } catch(Exception e) {
      logger.severe("Could not init from xml file : " +e);
      logger.fine("StackTrace:\n"+MyString.getStackTrace(e));

Examples of java.net.URL.openStream()

      URL configFile =
        PropertieSet.class.getResource("/org/quickserver/net/qsadmin/gui/conf/PropertieSet.xml");
      if(configFile==null)
        throw new RuntimeException("XML File not found : "+"PropertieSet.xml");

      InputStream input = configFile.openStream();     
      logger.fine("Loading command config from xml file : " + input);
      ps = (PropertieSet) digester.parse(input);     
    } catch(Exception e) {
      logger.severe("Could not init from xml file : " +e);
      logger.fine("StackTrace:\n"+MyString.getStackTrace(e));

Examples of lupos.datastructures.items.literal.URILiteral.openStream()

          .createURILiteralWithoutLazyLiteral("<inlinedata:" + text
              + ">");

      // first just retrieve the prefixes:

      final Reader reader = new InputStreamReader(rdfURL.openStream());
      final Map<String, String> prefixMap = JenaTurtleTripleConsumerPipe
          .retrievePrefixes(reader);

      for (final String prefix : prefixMap.keySet()) {
        this.prefix.addEntry(prefix, "<"

Examples of org.apache.batik.util.ParsedURL.openStream()

                            burl = ((SVGOMDocument)document).getURLObject();
                            final ParsedURL purl = new ParsedURL(burl, uri);
                            String e = EncodingUtilities.javaEncoding(enc);
                            e = ((e == null) ? enc : e);
                            Reader r =
                                new InputStreamReader(purl.openStream(), e);
                            r = new BufferedReader(r);
                            final StringWriter sw = new StringWriter();
                            int read;
                            char[] buf = new char[4096];
                            while ((read = r.read(buf, 0, buf.length)) != -1) {

Examples of org.apache.commons.fileupload.FileItemStream.openStream()

      try {
        FileItemIterator iter = uploadParser.getItemIterator(ureq.getHttpReq());
        while (iter.hasNext()) {
          FileItemStream item = iter.next();
          String itemName = item.getFieldName();
          InputStream itemStream = item.openStream();
          if (item.isFormField()) {
            // Normal form item
            // analog to ureq.getParameter in non-multipart mode
            String value = Streams.asString(itemStream, "UTF-8");
            addRequestParameter(itemName, value);

Examples of org.apache.flex.forks.batik.util.ParsedURL.openStream()

                            if (enc != null) {
                                e = EncodingUtilities.javaEncoding(enc);
                                e = ((e == null) ? enc : e);
                            }

                            InputStream is = purl.openStream();
                            Reader r;
                            if (e == null) {
                                // Not really a char encoding.
                                r = new InputStreamReader(is);
                            } else {

Examples of org.apache.ivy.plugins.repository.Resource.openStream()

            try {
                String metadataLocation = IvyPatternHelper.substitute(root
                        + "[organisation]/[module]/[revision]/maven-metadata.xml", mrid);
                Resource metadata = getRepository().getResource(metadataLocation);
                if (metadata.exists()) {
                    metadataStream = metadata.openStream();
                    final StringBuffer timestamp = new StringBuffer();
                    final StringBuffer buildNumer = new StringBuffer();
                    XMLHelper.parse(metadataStream, null, new ContextualSAXHandler() {
                        public void endElement(String uri, String localName, String qName)
                                throws SAXException {

Examples of org.apache.tapestry5.internal.services.assets.BytestreamCache.openStream()

    @Override
    public InputStream transform(Resource source, ResourceDependencies dependencies) throws IOException
    {
        BytestreamCache compiled = invokeLessCompiler(source, dependencies);

        return compiled.openStream();
    }

    private BytestreamCache invokeLessCompiler(Resource source, ResourceDependencies dependencies) throws IOException
    {
        try

Examples of org.apache.tapestry5.ioc.Resource.openStream()

    {
        Resource resource = mockResource();

        InputStream is = new ByteArrayInputStream(CONTENT.getBytes());

        expect(resource.openStream()).andReturn(is);

        replay();

        ResourceSymbolProvider provider = new ResourceSymbolProvider(resource);

Examples of org.codehaus.plexus.formica.util.MungedHttpsURL.openStream()

            }
            else
            {
                URL url = new URL( urlString );

                InputStream is = url.openStream();

                is.close();
            }
        }
        catch ( Exception e )
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.