本文整理汇总了Java中jcifs.smb.SmbException.printStackTrace方法的典型用法代码示例。如果您正苦于以下问题:Java SmbException.printStackTrace方法的具体用法?Java SmbException.printStackTrace怎么用?Java SmbException.printStackTrace使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类jcifs.smb.SmbException
的用法示例。
在下文中一共展示了SmbException.printStackTrace方法的5个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: main
import jcifs.smb.SmbException; //导入方法依赖的package包/类
public static void main( String argv[] ) throws Exception
{
if (argv.length < 2) {
System.err.println("usage: TestListLoop <smburl> <count>");
System.exit(0);
}
int count = Integer.parseInt(argv[1]);
for ( ;; ) {
try {
SmbFile f = new SmbFile(argv[0]);
SmbFile[] list = f.listFiles();
System.out.println("Successfully listed resource: " + list.length);
} catch (SmbException se) {
se.printStackTrace();
}
if (--count <= 0)
break;
Thread.sleep( 1000 );
}
}
示例2: isFile
import jcifs.smb.SmbException; //导入方法依赖的package包/类
@Override
public boolean isFile() {
try {
return super.isFile();
} catch (SmbException e) {
e.printStackTrace();
}
return false;
}
示例3: isDirectory
import jcifs.smb.SmbException; //导入方法依赖的package包/类
@Override
public boolean isDirectory() {
try {
return super.isDirectory();
} catch (SmbException e) {
e.printStackTrace();
}
return false;
}
示例4: fetchDirectoryList
import jcifs.smb.SmbException; //导入方法依赖的package包/类
/**
* Fetches the list of files and directories under this documentId. Caches this result and then notifies the {@link ExtraLoadingCursor} via the
* {@link ContentResolver} that it shall request the new data.
*/
private void fetchDirectoryList(String documentId, String[] projection) {
String accountName = DocumentIdUtils.getAccountName(documentId);
String path = DocumentIdUtils.getPath(documentId);
SMBConnection connection = getConnection(accountName);
try {
SmbFile directory = connection.openPath(path);
SmbFile[] files = directory.listFiles();
Document[] documents = new Document[files.length];
for (int i = 0; i < files.length; i++) {
SmbFile file = files[i];
documents[i] = new Document(file, documentId);
}
Cursor cursor = new DocumentCursor(projection, documents);
lastDirectoryDocumentId = documentId;
lastDirectoryDocumentList = documents;
cursorCache.put(documentId, cursor);
getContext().getContentResolver().notifyChange(DocumentsContract.buildDocumentUri(AUTHORITY, documentId), null);
} catch (SmbException e) {
e.printStackTrace();
}
}
示例5: bind
import jcifs.smb.SmbException; //导入方法依赖的package包/类
public void bind(BindInterceptorChain chain, DistinguishedName dn,
Password pwd, LDAPConstraints constraints) throws LDAPException {
Vector<RDN> rdns = dn.getDN().getRDNs();
String domain = rdns.get(1).getValue();
String user = rdns.get(0).getValue();
try {
SmbSession.logon(this.addr,new NtlmPasswordAuthentication(domain,user,new String(pwd.getValue())));
} catch (SmbException e) {
e.printStackTrace();
throw new LDAPException(e.toString(),LDAPException.INVALID_CREDENTIALS,"");
}
chain.getSession().put(SessionVariables.BOUND_INTERCEPTORS,this.name);
}