public void close() throws IOException { Tools.safeClose(applicationLifeCycle); applicationLifeCycle = null; } }
public void close() throws IOException { Tools.safeClose(applicationLifeCycle); applicationLifeCycle = null; } }
public void close() { ApplicationRuntime<?, ?> runtime = application.getAndSet(null); if (runtime != null) { Tools.safeClose(runtime); } } }
public void close() { ApplicationRuntime<?, ?> runtime = application.getAndSet(null); if (runtime != null) { Tools.safeClose(runtime); } } }
public static <T extends Serializable> void serialize(T value, OutputStream out) throws IOException { ObjectOutputStream ois = new ObjectOutputStream(out); try { ois.writeObject(value); } finally { safeClose(out); } }
public static <T extends Serializable> void serialize(T value, OutputStream out) throws IOException { ObjectOutputStream ois = new ObjectOutputStream(out); try { ois.writeObject(value); } finally { safeClose(out); } }
public static void write(byte[] content, File f) throws IOException { FileOutputStream out = new FileOutputStream(f); try { copy(new ByteArrayInputStream(content), out); } finally { safeClose(out); } }
public static String read(InputStream in, Charset charset) throws IOException { try { ByteArrayOutputStream baos = new ByteArrayOutputStream(); copy(in, baos); return new String(baos.toByteArray(), charset); } finally { safeClose(in); } }
public static byte[] bytes(InputStream in) throws IOException { try { ByteArrayOutputStream baos = new ByteArrayOutputStream(in.available()); copy(in, baos); return baos.toByteArray(); } finally { safeClose(in); } }
public static void write(byte[] content, File f) throws IOException { FileOutputStream out = new FileOutputStream(f); try { copy(new ByteArrayInputStream(content), out); } finally { safeClose(out); } }
public static byte[] bytes(InputStream in) throws IOException { try { ByteArrayOutputStream baos = new ByteArrayOutputStream(in.available()); copy(in, baos); return baos.toByteArray(); } finally { safeClose(in); } }
public static String read(InputStream in, Charset charset) throws IOException { try { ByteArrayOutputStream baos = new ByteArrayOutputStream(); copy(in, baos); return new String(baos.toByteArray(), charset); } finally { safeClose(in); } }
void stop() { if (assetServer != null) { assetServer.unregister(application); } Tools.safeClose(injectionContext); application = null; injectionContext = null; assetManager = null; descriptor = null; classLoader = null; }
public void invoke() throws Exception { try { bridge.getApplication().resolveBean(ControllerService.class).invoke(this); } finally { Tools.safeClose(this); } }
@After public void tearDown() { if (application != null) { Tools.safeClose(application); application = null; } }
void invoke() throws Exception { try { bridge.getApplication().resolveBean(ControllerService.class).invoke(this); } finally { Tools.safeClose(this); } }
void invoke() throws Exception { try { bridge.getApplication().resolveBean(ControllerService.class).invoke(this); } finally { Tools.safeClose(this); } }
@After public void tearDown() { if (application != null) { Tools.safeClose(application); application = null; } }