Examples of NoCloseOutputStream


Examples of org.apache.sshd.common.util.NoCloseOutputStream

                    channel.setIn(new NoCloseInputStream(System.in));
                    ((ChannelShell) channel).setPtyColumns(ShellUtils.getTermWidth(session));
                    ((ChannelShell) channel).setupSensibleDefaultPty();
                    ((ChannelShell) channel).setAgentForwarding(true);
                }
                channel.setOut(new NoCloseOutputStream(System.out));
                channel.setErr(new NoCloseOutputStream(System.err));
                channel.open();
                channel.waitFor(ClientChannel.CLOSED, 0);
            } finally {
                session.put(Console.IGNORE_INTERRUPTS, oldIgnoreInterrupts);
                sshSession.close(false);
View Full Code Here

Examples of org.apache.sshd.common.util.NoCloseOutputStream

                    Object ctype = session.get("LC_CTYPE");
                    if (ctype != null) {
                        ((ChannelShell) channel).setEnv("LC_CTYPE", ctype.toString());
                    }
                }
                channel.setOut(new NoCloseOutputStream(System.out));
                channel.setErr(new NoCloseOutputStream(System.err));
                channel.open().verify();
                channel.waitFor(ClientChannel.CLOSED, 0);
            } finally {
                session.put( Session.IGNORE_INTERRUPTS, oldIgnoreInterrupts );
                sshSession.close(false);
View Full Code Here

Examples of org.freehep.util.io.NoCloseOutputStream

        ImageGraphics2D.writeImage(
            (RenderedImage) image,
            ImageConstants.RAW.toLowerCase(),
            ImageGraphics2D.getRAWProperties(bkg, "BGR"),
            new NoCloseOutputStream(emf));
        // emf.writeImage(image, bkg, "BGR", 1);
        // png
        // encode = BI_PNG;
        // ImageGraphics2D.writeImage(image, "png", new Properties(), new
        // NoCloseOutputStream(emf));
View Full Code Here

Examples of org.freehep.util.io.NoCloseOutputStream

        UserProperties properties = new UserProperties();
        properties.setProperty(RawImageWriteParam.BACKGROUND, bkg);
        properties.setProperty(RawImageWriteParam.CODE, "BGR");
        properties.setProperty(RawImageWriteParam.PAD, 4);
        ImageGraphics2D.writeImage((RenderedImage)image, "raw", properties,
                new NoCloseOutputStream(emf));

        // emf.writeImage(image, bkg, "BGR", 4);
        int length = emf.popBuffer();

        BitmapInfoHeader header = new BitmapInfoHeader(
View Full Code Here

Examples of org.freehep.util.io.NoCloseOutputStream

        encode = BI_RGB;
        ImageGraphics2D.writeImage(
            (RenderedImage) image,
            ImageConstants.RAW.toLowerCase(),
            ImageGraphics2D.getRAWProperties(bkg, "*BGRA"),
            new NoCloseOutputStream(emf));

        // emf.writeImage(image, bkg, "*BGRA", 1);
        // png
        // encode = BI_PNG;
        // ImageGraphics2D.writeImage(image, "png", new Properties(), new
View Full Code Here

Examples of org.pentaho.reporting.engine.classic.core.util.NoCloseOutputStream

      document = new Document(pageSize, marginLeft, marginRight, marginTop, marginBottom);
      imageCache = new RTFImageCache(resourceManager);

      // rtf does not support PageFormats or other meta data...
      final RtfWriter2 instance = RtfWriter2.getInstance(document, new NoCloseOutputStream(outputStream));
      instance.getDocumentSettings().setAlwaysUseUnicode(true);

      final String author = config.getConfigProperty
          ("org.pentaho.reporting.engine.classic.core.modules.output.table.rtf.Author");
      if (author != null)
View Full Code Here

Examples of org.pentaho.reporting.engine.classic.core.util.NoCloseOutputStream

    if (fileName == null)
    {
      throw new NullPointerException();
    }

    final StreamRepository streamRepository = new StreamRepository(new NoCloseOutputStream(outputStream));
    final ContentLocation targetRoot = streamRepository.getRoot();

    task.setBodyContentLocation(targetRoot);
    task.setBodyNameGenerator(new DefaultNameGenerator(targetRoot, fileName, suffix));
  }
View Full Code Here

Examples of org.pentaho.reporting.engine.classic.core.util.NoCloseOutputStream

  public void testHTMLExport() throws ReportProcessingException, ResourceException
  {
    MasterReport report = DebugReportRunner.parseGoldenSampleReport("Prd-3529.prpt");
    // produce HTML output ..
    HtmlReportUtil.createStreamHTML(report, new NoCloseOutputStream(System.out));
  }
View Full Code Here

Examples of org.pentaho.reporting.engine.classic.core.util.NoCloseOutputStream

    final ResourceManager resourceManager = new ResourceManager();
    resourceManager.registerDefaults();
    final Resource directly = resourceManager.createDirectly(url, MasterReport.class);
    final MasterReport report = (MasterReport) directly.getResource();
    final MemoryByteArrayOutputStream mbos = new MemoryByteArrayOutputStream();
    XmlTableReportUtil.createFlowXML(report, new NoCloseOutputStream(mbos));

    final ByteArrayInputStream bin = new ByteArrayInputStream(mbos.getRaw(), 0, mbos.getLength());
    final DocumentBuilder documentBuilder = DocumentBuilderFactory.newInstance().newDocumentBuilder();
    final Document document = documentBuilder.parse(bin);
    final NodeList table = document.getDocumentElement().getElementsByTagName("table");
View Full Code Here

Examples of org.pentaho.reporting.engine.classic.core.util.NoCloseOutputStream

    final ResourceManager resourceManager = new ResourceManager();
    resourceManager.registerDefaults();
    final Resource directly = resourceManager.createDirectly(url, MasterReport.class);
    final MasterReport report = (MasterReport) directly.getResource();
    final MemoryByteArrayOutputStream mbos = new MemoryByteArrayOutputStream();
    ExcelReportUtil.createXLS(report, new NoCloseOutputStream(mbos));

    final ByteArrayInputStream bin = new ByteArrayInputStream(mbos.getRaw(), 0, mbos.getLength());
    final Workbook workbook = WorkbookFactory.create(bin);
    assertEquals(4, workbook.getNumberOfSheets());
    assertEquals("Summary", workbook.getSheetAt(0).getSheetName());
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.