JCIFS-NGのAPIをテストするためのアプリです。
TestCode.javaを編集してテスト用のAPIを記述して、AndroidStudioでRunするだけです。
//ここからテストコード prop.setProperty("jcifs.smb.client.minVersion", "SMB202"); prop.setProperty("jcifs.smb.client.maxVersion", "SMB300"); BaseContext bc = new BaseContext(new PropertyConfiguration(prop)); NtlmPasswordAuthentication creds = new NtlmPasswordAuthentication(bc, domain_name, account_name, account_password); CIFSContext ct = bc.withCredentials(creds); SmbFile sf=new SmbFile("smb://192.168.200.128/D/", ct); // InputStream is=sf.getInputStream(); // // int rc=0; // byte[] buff=new byte[1024]; // while((rc=is.read(buff))>0) { // // } String[] fl=sf.list(); sf.close(); for(String item:fl) activity.putLogMsg(item); |
