/** * Close the log. * * @see net.sf.microlog.core.appender.AbstractAppender#close() */ public synchronized void close() throws IOException { if (messageConnection != null) { messageConnection.close(); } logOpen = false; }
public void close() throws IOException { StreamConnectionNotifier n = this.notifier; this.notifier = null; if (n != null) { n.close(); } }
/** * Discconnect from the server. */ protected void disconnect() throws IOException { connection.close(); }
public void close() throws IOException { impl.close(); }
public void close() throws IOException { impl.close(); }
public void close() throws IOException { impl.close(); }
public void close() throws IOException { impl.close(); }
/** * Close the <code>Connection</code> silent. * * @param connection * the <code>Connection</code> to close. */ public static void closeSilent(Connection connection) { if (connection != null) { try { connection.close(); } catch (IOException e) { e.printStackTrace(); } } } }
public void close() throws IOException { StreamConnection c = this.conn; this.conn = null; try { if (this.is != null) { this.is.close(); this.is = null; } if (this.os != null) { this.os.close(); this.os = null; } } finally { if (c != null) { c.close(); } } }
/** * Shuts down this connector service, closing all lingering connections. */ public void shutdown() { final List<Connection> connections; synchronized ( this.openConnections ) { connections = new ArrayList<Connection>( this.openConnections ); } for ( Connection conn : connections ) { try { conn.close(); } catch ( IOException exception ) { this.logService.log( LogService.LOG_DEBUG, "I/O exception closing connection!", exception ); } } }
/** * @see org.osgi.service.io.ConnectorService#openDataOutputStream(java.lang.String) */ public DataOutputStream openDataOutputStream(String name) throws IOException { Connection connection = open(name, WRITE, false); if (!(connection instanceof OutputConnection)) { try { connection.close(); } catch (IOException ioex) { } throw new IOException("Connection doesn't implement OutputConnection" + connection.getClass()); } return ((OutputConnection) connection).openDataOutputStream(); }
public static OutputStream openOutputStream(String name) throws IOException { OutputConnection con = ((OutputConnection) openImpl(name, WRITE, false, false)); try { return con.openOutputStream(); } finally { con.close(); } }
/** * @see org.osgi.service.io.ConnectorService#openInputStream(java.lang.String) */ public InputStream openInputStream(String name) throws IOException { Connection connection = open(name, READ, false); if (!(connection instanceof InputConnection)) { try { connection.close(); } catch (IOException ioex) { } throw new IOException("Connection doesn't implement InputConnection" + connection.getClass()); } return ((InputConnection) connection).openInputStream(); }
/** * @see org.osgi.service.io.ConnectorService#openDataInputStream(java.lang.String) */ public DataInputStream openDataInputStream(String name) throws IOException { Connection connection = open(name, READ, false); if (!(connection instanceof InputConnection)) { try { connection.close(); } catch (IOException ioex) { } throw new IOException("Connection doesn't implement InputConnection" + connection.getClass()); } return ((InputConnection) connection).openDataInputStream(); }
/** * @see org.osgi.service.io.ConnectorService#openOutputStream(java.lang.String) */ public OutputStream openOutputStream(String name) throws IOException { Connection connection = open(name, WRITE, false); if (!(connection instanceof OutputConnection)) { try { connection.close(); } catch (IOException ioex) { } throw new IOException("Connection doesn't implement OutputConnection" + connection.getClass()); } return ((OutputConnection) connection).openOutputStream(); }
public static InputStream openInputStream(String name) throws IOException { InputConnection con = ((InputConnection) openImpl(name, READ, false, false)); try { return con.openInputStream(); } finally { con.close(); } }
/** * @throws IllegalArgumentException * @throws ConnectionNotFoundException * @throws IOException * @throws SecurityException */ public static DataInputStream openDataInputStream(String name) throws IOException { Connection c= Connector.open(name, Connector.READ); try { if(!(c instanceof InputConnection)) { throw new IllegalArgumentException(name + " does not refer to an InputConnection"); } return ((InputConnection) c).openDataInputStream(); } finally { c.close(); } }
/** * @throws IllegalArgumentException * @throws ConnectionNotFoundException * @throws IOException * @throws SecurityException */ public static DataOutputStream openDataOutputStream(String name) throws IOException { Connection c= Connector.open(name, Connector.WRITE); try { if(!(c instanceof OutputConnection)) { throw new IllegalArgumentException(name + " does not refer to an OutputConnection"); } return ((OutputConnection) c).openDataOutputStream(); } finally { c.close(); } }