Java Code Examples for org.openide.windows.OutputWriter#flush()

The following examples show how to use org.openide.windows.OutputWriter#flush() . You can vote up the ones you like or vote down the ones you don't like, and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example 1
Source File: FtpClient.java    From netbeans with Apache License 2.0 6 votes vote down vote up
private void processEvent(ProtocolCommandEvent event) {
    String message = event.getMessage();
    if (message.startsWith("PASS ")) { // NOI18N
        // hide password
        message = "PASS ******"; // NOI18N
    }
    OutputWriter writer = null;
    if (event.isReply()
            && (FTPReply.isNegativeTransient(event.getReplyCode()) || FTPReply.isNegativePermanent(event.getReplyCode()))) {
        writer = io.getErr();
    } else {
        writer = io.getOut();
    }
    writer.println(message.trim());
    writer.flush();
    if (LOGGER.isLoggable(Level.FINE)) {
        LOGGER.log(Level.FINE, "Command listener: {0}", message.trim());
    }
}
 
Example 2
Source File: RetrieverEngineImpl.java    From netbeans with Apache License 2.0 5 votes vote down vote up
private void updateDownloadingInfo(RetrieveEntry rent) {
    OutputWriter opt = getOPOut();
    if(rent.getBaseAddress() != null){
        opt.println(
                NbBundle.getMessage(RetrieverEngineImpl.class,
                "MSG_retrieving_location_found_in",rent.getCurrentAddress(),
                rent.getBaseAddress())); //NOI18N
    }else{
        opt.println(
                NbBundle.getMessage(RetrieverEngineImpl.class,
                "MSG_retrieving_location",rent.getCurrentAddress())); //NOI18N
    }
    opt.flush();
}
 
Example 3
Source File: RetrieverEngineImpl.java    From netbeans with Apache License 2.0 5 votes vote down vote up
private void updateDownloadedInfo(RetrieveEntry rent) {
    retrievedList.add(rent);
    OutputWriter opt = getOPOut();
    String str = "   "+rent.getEffectiveAddress();
    opt.println(
            NbBundle.getMessage(RetrieverEngineImpl.class,
            "MSG_retrieved_saved_at",str, rent.getSaveFile())); //NOI18N
    opt.flush();
}
 
Example 4
Source File: SimpleIO.java    From netbeans with Apache License 2.0 4 votes vote down vote up
/**
 * Writes a string to the output window
 * 
 * @param s string to be written
 */
public synchronized void write(String s) {
    OutputWriter writer = io.getOut();
    writer.print(s);
    writer.flush();
}
 
Example 5
Source File: SimpleIO.java    From netbeans with Apache License 2.0 4 votes vote down vote up
/**
 * Writes a string to the output window
 * 
 * @param s string to be written
 */
public synchronized void write(String s) {
    OutputWriter writer = io.getOut();
    writer.print(s);
    writer.flush();
}
 
Example 6
Source File: RetrieverEngineImpl.java    From netbeans with Apache License 2.0 4 votes vote down vote up
private void outputError(String str){
    OutputWriter err = getErrOut();
    err.println(NbBundle.getMessage(RetrieverEngineImpl.class, "MSG_Error_str",
            str)); //NOI18N
    err.flush();
}
 
Example 7
Source File: RetrieverEngineImpl.java    From netbeans with Apache License 2.0 4 votes vote down vote up
private void outputMessage(String str){
    OutputWriter err = getOPOut();
    err.println(str); //NOI18N
    err.flush();
}