Package org.primefaces.model

Examples of org.primefaces.model.StreamedContent


    public List<EntityMiner> getMiners() {
        return dao.executeNamedQuery("Miner.findAllTheLatest");
    }

    public StreamedContent downloadLOG(EntityMiner miner) {
        StreamedContent file = null;
        try {
            file = JsfUtil.downloadLogFile(miner);
        } catch (Exception ex) {
            ex.printStackTrace();
            JsfUtil.addErrorMessage(ex.toString());
View Full Code Here


        }
        return metrics;
    }

    public StreamedContent downloadCSV(EntityMetric metric) {
        StreamedContent file = null;
        try {
            OutLog out = new OutLog();

            System.out.println("Metric tem nodes: " + metric.getNodes().size());
View Full Code Here

        }
        return file;
    }

    public StreamedContent downloadLOG(EntityMetric metric) {
        StreamedContent file = null;
        try {
            String fileName = generateFileName(metric) + ".log";

            ByteArrayOutputStream baos = new ByteArrayOutputStream();
            PrintWriter pw = new PrintWriter(baos);
View Full Code Here

        }
        return file;
    }

    public StreamedContent downloadParams(EntityMetric metric) {
        StreamedContent file = null;
        try {
            String fileName = generateFileName(metric) + ".txt";

            ByteArrayOutputStream baos = new ByteArrayOutputStream();
            PrintWriter pw = new PrintWriter(baos);
View Full Code Here

        }

        pw.flush();
        pw.close();

        StreamedContent file = JsfUtil.downloadFile(fileName, baos.toByteArray());

        baos.close();

        return file;
    }
View Full Code Here

TOP

Related Classes of org.primefaces.model.StreamedContent

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.