Examples of closeOutputStream()


Examples of org.eclipse.persistence.internal.weaving.AbstractStaticWeaveOutputHandler.closeOutputStream()

            } finally {
                // Need close the inputstream for current entry before processing next one.
                entryInputStream.close();
            }
        }
        swoh.closeOutputStream();
    }

   
    //Extract directory from entry name.   
    public static String getDirectoryFromEntryName(String entryName){
View Full Code Here

Examples of org.eclipse.persistence.internal.weaving.AbstractStaticWeaveOutputHandler.closeOutputStream()

            } finally {
                // Need close the inputstream for current entry before processing next one.
                entryInputStream.close();
            }
        }
        swoh.closeOutputStream();
    }

   
    //Extract directory from entry name.   
    public static String getDirectoryFromEntryName(String entryName){
View Full Code Here

Examples of org.eclipse.persistence.internal.weaving.AbstractStaticWeaveOutputHandler.closeOutputStream()

            } finally {
                // Need close the inputstream for current entry before processing next one.
                entryInputStream.close();
            }
        }
        swoh.closeOutputStream();
    }

   
    //Extract directory from entry name.   
    public static String getDirectoryFromEntryName(String entryName){
View Full Code Here

Examples of org.pentaho.platform.api.repository.IContentItem.closeOutputStream()

          response.resetBuffer();
          formatter.formatFailureMessage( htmlMimeType, runtime, buffer, requestHandler.getMessages() );
        }

        outputStream.write( buffer.toString().getBytes( LocaleHelper.getSystemEncoding() ) );
        responseContentItem.closeOutputStream();
      }
    } finally {
      if ( runtime != null ) {
        runtime.dispose();
      }
View Full Code Here

Examples of org.pentaho.platform.api.repository.IContentItem.closeOutputStream()

        }
        result =
            writeReport( outputFormat, report, outputStream, jFreeReportAction.getReportGenerationYieldRate()
                .getIntValue( 0 ), jFreeReportAction.getHtmlContentHandlerUrlPattern().getStringValue() );
        if ( contentItem != null ) {
          contentItem.closeOutputStream();
        }
      } else {
        warn( Messages.getInstance().getString( "JFreeReportAllContentComponent.WARN_NO_PRINTER_GIVEN" ) ); //$NON-NLS-1$
      }
    } finally {
View Full Code Here

Examples of org.pentaho.platform.api.repository.IContentItem.closeOutputStream()

    handler.setOutput( "file:bogus", null );

    IContentItem content3 = new BufferedContentItem( null );
    OutputStream os = content3.getOutputStream( null );
    os.write( "test data".getBytes() );
    content3.closeOutputStream();
    handler.setOutput( IOutputHandler.CONTENT, content3 );

    assertEquals( "test data", new String( out.toByteArray() ) );

    handler.setOutput( IOutputHandler.CONTENT, "+test data2" );
View Full Code Here

Examples of org.pentaho.platform.api.repository.IContentItem.closeOutputStream()

    assertEquals( content.getOutputStream( null ), content2.getOutputStream( null ) );

    IContentItem content3 = new BufferedContentItem( null );
    content3.getOutputStream( null ).write( "test data".getBytes() );
    content3.closeOutputStream();

    try {
      handler.setOutput( IOutputHandler.CONTENT, content3 );
      fail( "Exception not detected." );
    } catch ( Exception ex ) {
View Full Code Here

Examples of org.pentaho.platform.api.repository.IContentItem.closeOutputStream()

            try {
              outputStream = outputContentItem.getOutputStream( getActionName() );
              outputStream.write( theOutput.getBytes( LocaleHelper.getSystemEncoding() ) );
              outputStream.flush();
              outputStream.close();
              outputContentItem.closeOutputStream();
            } catch ( Exception e ) {
              error( Messages.getInstance().getErrorString( "ContentOutputComponent.ERROR_0003_WRITING_OUTPUT" ), e ); //$NON-NLS-1$
              return false;
            }
            trace( theOutput );
View Full Code Here

Examples of org.pentaho.platform.api.repository.IContentItem.closeOutputStream()

          while ( ( len = is.read( buff ) ) >= 0 ) {
            outputStream.write( buff, 0, len );
          }
          outputStream.flush();
          outputStream.close();
          outputContentItem.closeOutputStream();
          return true;
        } else if ( dataToOutput instanceof ByteArrayOutputStream ) {
          ByteArrayOutputStream baos = (ByteArrayOutputStream) dataToOutput;
          outputStream = outputContentItem.getOutputStream( null );
          outputStream.write( baos.toByteArray() );
View Full Code Here

Examples of org.pentaho.platform.api.repository.IContentItem.closeOutputStream()

          ByteArrayOutputStream baos = (ByteArrayOutputStream) dataToOutput;
          outputStream = outputContentItem.getOutputStream( null );
          outputStream.write( baos.toByteArray() );
          outputStream.flush();
          outputStream.close();
          outputContentItem.closeOutputStream();
          return true;
        } else {
          error( Messages.getInstance().getErrorString(
              "ContentOutputComponent.ERROR_0007_UNKNOWN_TYPE", dataToOutput.getClass().getName() ) ); //$NON-NLS-1$
          return false;
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.