private void encodedWrite(String encodedString) throws IOException { if(closed) { throw new IOException("Output Stream is closed"); //$NON-NLS-1$ } if (prependCR){ encodedString="\r"+encodedString; //$NON-NLS-1$ prependCR=false; } if (encodedString.endsWith("\r")) { //$NON-NLS-1$ prependCR = true; encodedString = new String(encodedString.substring(0, encodedString.length()-1)); } notifyParitioner(encodedString); }
private synchronized void encodedWrite(String encodedString) throws IOException { if(closed) { throw new IOException("Output Stream is closed"); //$NON-NLS-1$ } String newencoding = encodedString; if (prependCR){ newencoding = "\r" + newencoding; //$NON-NLS-1$ prependCR=false; } if (newencoding.endsWith("\r")) { //$NON-NLS-1$ prependCR = true; newencoding = new String(newencoding.substring(0, newencoding.length() - 1)); } notifyParitioner(newencoding); }
public synchronized void close() throws IOException { if(closed) { throw new IOException("Output Stream is closed"); //$NON-NLS-1$ } if (prependCR) { // force writing of last /r prependCR = false; notifyParitioner("\r"); //$NON-NLS-1$ } console.streamClosed(this); closed = true; partitioner = null; }
@Override public synchronized void close() throws IOException { if(closed) { throw new IOException("Output Stream is closed"); //$NON-NLS-1$ } if (prependCR) { // force writing of last /r prependCR = false; notifyParitioner("\r"); //$NON-NLS-1$ } console.streamClosed(this); closed = true; partitioner = null; }