- Add the Codota plugin to your IDE and get smart completions
private void myMethod () {FileOutputStream f =
File file;new FileOutputStream(file)
String name;new FileOutputStream(name)
File file;new FileOutputStream(file, true)
- Smart code suggestions by Codota
}
/** * Sets the {@link PoolableObjectFactory factory} this pool uses * to create new instances. Trying to change * the <code>factory</code> while there are borrowed objects will * throw an {@link IllegalStateException}. * * @param factory the {@link PoolableObjectFactory} used to create new instances. * @throws IllegalStateException when the factory cannot be set at this time * @deprecated to be removed in pool 2.0 */ @Deprecated @Override public synchronized void setFactory(PoolableObjectFactory<T> factory) throws IllegalStateException { assertOpen(); if(0 < getNumActive()) { throw new IllegalStateException("Objects are already active"); } else { clear(); _factory = factory; } }
assertOpen(); if (_factory == null) { throw new IllegalStateException("Cannot add objects without a factory.");
assertOpen(); T obj = null; boolean newlyCreated = false;
/** * Sets the {@link PoolableObjectFactory factory} this pool uses * to create new instances. Trying to change * the <code>factory</code> while there are borrowed objects will * throw an {@link IllegalStateException}. * * @param factory the {@link PoolableObjectFactory} used to create new instances. * @throws IllegalStateException when the factory cannot be set at this time * @deprecated to be removed in pool 2.0 */ @Deprecated @Override public synchronized void setFactory(PoolableObjectFactory<T> factory) throws IllegalStateException { assertOpen(); if(0 < getNumActive()) { throw new IllegalStateException("Objects are already active"); } else { clear(); _factory = factory; } }
/** * Sets the {@link PoolableObjectFactory factory} this pool uses * to create new instances. Trying to change * the <code>factory</code> while there are borrowed objects will * throw an {@link IllegalStateException}. * * @param factory the {@link PoolableObjectFactory} used to create new instances. * @throws IllegalStateException when the factory cannot be set at this time * @deprecated to be removed in pool 2.0 */ @Deprecated @Override public synchronized void setFactory(PoolableObjectFactory<T> factory) throws IllegalStateException { assertOpen(); if(0 < getNumActive()) { throw new IllegalStateException("Objects are already active"); } else { clear(); _factory = factory; } }
/** * Sets the {@link PoolableObjectFactory factory} this pool uses * to create new instances. Trying to change * the <code>factory</code> while there are borrowed objects will * throw an {@link IllegalStateException}. * * @param factory the {@link PoolableObjectFactory} used to create new instances. * @throws IllegalStateException when the factory cannot be set at this time */ public synchronized void setFactory(PoolableObjectFactory factory) throws IllegalStateException { assertOpen(); if(0 < getNumActive()) { throw new IllegalStateException("Objects are already active"); } else { clear(); _factory = factory; } }
/** * Sets the {@link PoolableObjectFactory factory} this pool uses * to create new instances. Trying to change * the <code>factory</code> while there are borrowed objects will * throw an {@link IllegalStateException}. * * @param factory the {@link PoolableObjectFactory} used to create new instances. * @throws IllegalStateException when the factory cannot be set at this time */ public synchronized void setFactory(PoolableObjectFactory factory) throws IllegalStateException { assertOpen(); if(0 < getNumActive()) { throw new IllegalStateException("Objects are already active"); } else { clear(); _factory = factory; } }
assertOpen(); if (_factory == null) { throw new IllegalStateException("Cannot add objects without a factory.");
public synchronized Object borrowObject() throws Exception { assertOpen(); Object obj = null; boolean newlyCreated = false;
public synchronized Object borrowObject() throws Exception { assertOpen(); Object obj = null; boolean newlyCreated = false;
assertOpen(); if (_factory == null) { throw new IllegalStateException("Cannot add objects without a factory.");
assertOpen(); if (_factory == null) { throw new IllegalStateException("Cannot add objects without a factory.");
assertOpen(); if (_factory == null) { throw new IllegalStateException("Cannot add objects without a factory.");
assertOpen(); T obj = null; boolean newlyCreated = false;
assertOpen(); T obj = null; boolean newlyCreated = false;