Examples of InputStreamSource


Examples of org.springframework.core.io.InputStreamSource

        return all.toArray(new String[all.size()]);
    }

    private void overrideSchemaForInclude(final Schema schema) {
        InputStreamSource sourceWithoutIncludes = new InputStreamSource() {
            public InputStream getInputStream() throws IOException {
                return new ByteArrayInputStream(SchemaUtil.getSchemaContentWithoutIncludes(schema));
            }
        };
View Full Code Here

Examples of org.springframework.core.io.InputStreamSource

        addSchema(new SchemaImpl(schema.getName(), schema.getVersion(), schema.getTargetNamespace(),
                                 schema.getPreferredNsPrefix(), schema.getSourceDescription(), sourceWithoutIncludes));
    }

    private Schema setSchemaWithIncludes(final Schema schema, final Map<String, Schema> allIncludes) {
        InputStreamSource sourceWithModifiedIncludes = new InputStreamSource() {
            public InputStream getInputStream() throws IOException {
                return new ByteArrayInputStream(SchemaUtil.getSchemaContentWithIndirectIncludes(schema, allIncludes));
            }
        };
View Full Code Here

Examples of org.springframework.core.io.InputStreamSource

        return all.toArray(new String[all.size()]);
    }

    private void overrideSchemaForInclude(final Schema schema) {
        InputStreamSource sourceWithoutIncludes = new InputStreamSource() {
            public InputStream getInputStream() throws IOException {
                return new ByteArrayInputStream(SchemaUtil.getSchemaContentWithoutIncludes(schema));
            }
        };
View Full Code Here

Examples of org.springframework.core.io.InputStreamSource

        addSchema(new SchemaImpl(schema.getName(), schema.getVersion(), schema.getTargetNamespace(),
                schema.getPreferredNsPrefix(), schema.getSourceDescription(), sourceWithoutIncludes));
    }

    private Schema setSchemaWithIncludes(final Schema schema, final Map<String, Schema> allIncludes) {
        InputStreamSource sourceWithModifiedIncludes = new InputStreamSource() {
            public InputStream getInputStream() throws IOException {
                return new ByteArrayInputStream(SchemaUtil.getSchemaContentWithIndirectIncludes(schema, allIncludes));
            }
        };
View Full Code Here

Examples of org.springframework.core.io.InputStreamSource

            if (matcher.find()) {
                version = matcher.group(1);
            }

            InputStreamSource source = getResource(classpathLocation, uri);

            if (source != null) {
                nameToSchemaMappings.put(schemaName, new SchemaImpl(schemaName, version, true, desc, source));
                uriToNameMappings.put(uri, schemaName);
            }
View Full Code Here

Examples of org.springframework.core.io.InputStreamSource

        for (final Attachment attachment : soapMessage.getAttachments()) {
            if (log.isDebugEnabled()) {
                log.debug(String.format("Adding attachment to SOAP message: '%s' ('%s')", attachment.getContentId(), attachment.getContentType()));
            }

            soapRequest.addAttachment(attachment.getContentId(), new InputStreamSource() {
                public InputStream getInputStream() throws IOException {
                    return attachment.getInputStream();
                }
            }, attachment.getContentType());
        }
View Full Code Here

Examples of org.springframework.core.io.InputStreamSource

        expect(soapRequest.getSoapBody()).andReturn(soapBody).once();
        expect(soapBody.getPayloadResult()).andReturn(new StringResult()).once();

        expect(soapRequest.addAttachment(eq(attachment.getContentId()), (InputStreamSource)anyObject(), eq(attachment.getContentType()))).andAnswer(new IAnswer<Attachment>() {
            public Attachment answer() throws Throwable {
                InputStreamSource contentStream = (InputStreamSource)EasyMock.getCurrentArguments()[1];
                BufferedReader reader = new BufferedReader(new InputStreamReader(contentStream.getInputStream()));

                Assert.assertEquals(reader.readLine(), "This is a SOAP attachment");
                Assert.assertEquals(reader.readLine(), "with multi-line");

                reader.close();
View Full Code Here

Examples of org.svenson.tokenize.InputStreamSource

  }

  @SuppressWarnings("unchecked")
  private ManagedObject<GId> readFile(String file) {
    InputStream is = getClass().getResourceAsStream(file);
    InputStreamSource source = new InputStreamSource(is, true);
    return ManagedObject.getJSONParser().parse(ManagedObject.class, source);
  }
View Full Code Here

Examples of streamer.InputStreamSource

        // System.setProperty("streamer.Pipeline.debug", "true");

        InputStream is = new ByteArrayInputStream("RFB 003.007\ntest".getBytes(RfbConstants.US_ASCII_CHARSET));
        ByteArrayOutputStream initOS = new ByteArrayOutputStream();
        ByteArrayOutputStream mainOS = new ByteArrayOutputStream();
        InputStreamSource inputStreamSource = new InputStreamSource("source", is);
        OutputStreamSink outputStreamSink = new OutputStreamSink("mainSink", mainOS);

        Vnc33Hello hello = new Vnc33Hello("hello");

        Pipeline pipeline = new PipelineImpl("test");
View Full Code Here

Examples of streamer.InputStreamSource

        // System.setProperty("streamer.Pipeline.debug", "true");

        InputStream is = new ByteArrayInputStream("RFB 003.007\ntest".getBytes(RfbConstants.US_ASCII_CHARSET));
        ByteArrayOutputStream initOS = new ByteArrayOutputStream();
        ByteArrayOutputStream mainOS = new ByteArrayOutputStream();
        InputStreamSource inputStreamSource = new InputStreamSource("source", is);
        OutputStreamSink outputStreamSink = new OutputStreamSink("mainSink", mainOS);

        Vnc_3_3_Hello hello = new Vnc_3_3_Hello("hello");

        Pipeline pipeline = new PipelineImpl("test");
View Full Code Here
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.