compat/src/androidTest/java/androidx/core/provider/MockFontProvider.java
private static void copy(InputStream is, File file) throws IOException {
        FileOutputStream fos = null;
        try {
            fos = new FileOutputStream(file, false);
            byte[] buffer = new byte[1024];
            int readLen;
            while ((readLen = is.read(buffer)) != -1) {
                fos.write(buffer, 0, readLen);
            }
        } finally {
            if (fos != null) {
                fos.close();
            }
        }
    }
/**
     * The caller is responsible for closing the given InputStream.
     */
The caller is responsible for closing the given InputStream.
The caller is responsible for closing the given InputStream .
private static void copy(InputStream is, File file) throws IOException {
        FileOutputStream fos = null;
        try {
            fos = new FileOutputStream(file, false);
            byte[] buffer = new byte[1024];
            int readLen;
            while ((readLen = is.read(buffer)) != -1) {
                fos.write(buffer, 0, readLen);
            }
        } finally {
            if (fos != null) {
                fos.close();
            }
        }
    }
private static void copy ( InputStream is , File file ) throws IOException { FileOutputStream fos = null ; try { fos = new FileOutputStream ( file , false ) ; byte [ ] buffer = new byte [ 1024 ] ; int readLen ; while ( ( readLen = is . read ( buffer ) ) != - 1 ) { fos . write ( buffer , 0 , readLen ) ; } } finally { if ( fos != null ) { fos . close ( ) ; } } }
The caller is responsible for closing the given InputStream.
The caller is responsible for closing the given InputStream .