AI2 Component  (Version nb184)
IOUtils.java
Go to the documentation of this file.
1 // -*- mode: java; c-basic-offset: 2; -*-
2 // Copyright 2016-2017 MIT, All rights reserved
3 // Released under the Apache License, Version 2.0
4 // http://www.apache.org/licenses/LICENSE-2.0
5 
6 package com.google.appinventor.components.runtime.util;
7 
8 import java.io.Closeable;
9 import java.io.IOException;
10 
11 import android.util.Log;
12 
13 public final class IOUtils {
17  public static void closeQuietly(String tag, Closeable closeable) {
18  try {
19  if (closeable != null) {
20  closeable.close();
21  }
22  } catch (IOException e) {
23  Log.w(tag, "Failed to close resource", e);
24  }
25  }
26 }
com.google.appinventor.components.runtime.util.IOUtils
Definition: IOUtils.java:13
com.google.appinventor.components.runtime.util.IOUtils.closeQuietly
static void closeQuietly(String tag, Closeable closeable)
Definition: IOUtils.java:17