압축 파일의 전송 및 코드 추가 입력법

1420 단어 입력법
static boolean copyApkFile(File outputFile){ 
        try { 
            FileInputStream fis = new FileInputStream(this.getClass().getResource("/resources/myApkFile.apk").getFile()); 
            ZipInputStream zis = new ZipInputStream(fis); 
            FileOutputStream fos = new FileOutputStream(outputFile)); 
            ZipOutputStream zos = new ZipOutputStream(fos); 
            ZipEntry ze = null; 
            byte[] buf = new byte[1024]; 
            while ((ze = zis.getNextEntry()) != null) { 
                System.out.println("Next entry "+ze.getName()+" "+ze.getSize()); 
                zos.putNextEntry(ze); 
                int len; 
                while ((len = zis.read(buf)) > 0) { 
                  zos.write(buf, 0, len); 
                } 
            } 
            zos.close(); 
            fos.close(); 
            zis.close(); 
            fis.close(); 
            return true; 
        } catch (IOException ex) { 
            Logger.getLogger(SetUpNewDevice.class.getName()).log(Level.SEVERE, null, ex); 
            return false; 
        }

 Typeface face = Typeface.createFromAsset(getAssets(), "fonts/my_font.ttf"); TextView myText = new TextView(this);      myText.setTypeface(face);

좋은 웹페이지 즐겨찾기