java.security.AccessControlException.toString()方法的使用及代码示例

x33g5p2x  于2022-01-15 转载在 其他  
字(4.6k)|赞(0)|评价(0)|浏览(215)

本文整理了Java中java.security.AccessControlException.toString()方法的一些代码示例,展示了AccessControlException.toString()的具体用法。这些代码示例主要来源于Github/Stackoverflow/Maven等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。AccessControlException.toString()方法的具体详情如下:
包路径:java.security.AccessControlException
类名称:AccessControlException
方法名:toString

AccessControlException.toString介绍

暂无

代码示例

代码示例来源:origin: groovy/groovy-core

protected void executeScript(Class scriptClass, Permission missingPermission) {
  try {
    Script script = InvokerHelper.createScript(scriptClass, new Binding());
    script.run();
    //InvokerHelper.runScript(scriptClass, null);
  } catch (AccessControlException ace) {
    if (missingPermission != null && missingPermission.implies(ace.getPermission())) {
      return;
    } else {
      fail(ace.toString());
    }
  }
  if (missingPermission != null) {
    fail("Should catch an AccessControlException");
  }
}

代码示例来源:origin: com.caucho/resin

public long getLastModified()
{
 try {
  return getFile().lastModified();
 } catch (AccessControlException e) {
  log.finer(e.toString());
  return -1;
 }
}

代码示例来源:origin: com.caucho/resin

public long getLength()
{
 try {
  return getFile().length();
 } catch (AccessControlException e) {
  log.finer(e.toString());
  return -1;
 }
}

代码示例来源:origin: com.caucho/resin

public boolean isDirectory()
{
 try {
  return getFile().isDirectory();
 } catch (AccessControlException e) {
  log.finer(e.toString());
  return false;
 }
}

代码示例来源:origin: baratine/baratine

public long length()
{
 try {
  return getFile().length();
 } catch (AccessControlException e) {
  log.finer(e.toString());
  return -1;
 }
}

代码示例来源:origin: baratine/baratine

@Override
public boolean isDirectory()
{
 try {
  return getFile().isDirectory();
 } catch (AccessControlException e) {
  log.finer(e.toString());
  return false;
 }
}

代码示例来源:origin: baratine/baratine

public long getLastModified()
{
 try {
  return getFile().lastModified();
 } catch (AccessControlException e) {
  log.finer(e.toString());
  return -1;
 }
}

代码示例来源:origin: de.tudarmstadt.ukp.inception.rdf4j/rdf4j-sail-api

public void release() {
  try {
    if (hook != null) {
      Runtime.getRuntime().removeShutdownHook(hook);
      hook = null;
    }
  }
  catch (IllegalStateException e) {
    // already shutting down
  }
  catch (AccessControlException e) {
    logger.warn(e.toString(), e);
  }
  delete();
}

代码示例来源:origin: com.caucho/resin

/**
 * Returns a list of files in the directory.
 */
public String []list() throws IOException
{
 try {
  String []list = getFile().list();
  
  if (list != null)
   return list;
 } catch (AccessControlException e) {
  log.finer(e.toString());
 }
 return new String[0];
}

代码示例来源:origin: baratine/baratine

/**
 * Returns a list of files in the directory.
 */
public String []list() throws IOException
{
 try {
  String []list = getFile().list();
  if (list != null)
   return list;
 } catch (AccessControlException e) {
  log.finer(e.toString());
 }
 return new String[0];
}

代码示例来源:origin: org.eclipse.rdf4j/rdf4j-sail-api

public void release() {
  try {
    if (hook != null) {
      Runtime.getRuntime().removeShutdownHook(hook);
      hook = null;
    }
  }
  catch (IllegalStateException e) {
    // already shutting down
  }
  catch (AccessControlException e) {
    logger.warn(e.toString(), e);
  }
  delete();
}

代码示例来源:origin: com.caucho/resin

public boolean isFile()
{
 try {
  if (_isWindows && isAux())
   return false;
  else
   return getFile().isFile();
 } catch (AccessControlException e) {
  log.finer(e.toString());
  return false;
 }
}

代码示例来源:origin: com.caucho/resin

public boolean canRead()
{
 try {
  File file = getFile();
  if (_isWindows && isAux())
   return false;
  else
   return file.canRead();
 } catch (AccessControlException e) {
  log.finer(e.toString());
  return false;
 }
}

代码示例来源:origin: com.caucho/resin

@Override
public boolean exists()
{
 try {
  if (_isWindows && isAux())
   return false;
  else
   return getFile().exists();
 } catch (AccessControlException e) {
  log.finer(e.toString());
  return false;
 }
}

代码示例来源:origin: baratine/baratine

public boolean canRead()
{
 try {
  File file = getFile();
  if (_isWindows && isAux())
   return false;
  else
   return file.canRead();
 } catch (AccessControlException e) {
  log.finer(e.toString());
  return false;
 }
}

代码示例来源:origin: com.caucho/resin

public boolean canWrite()
{
 try {
  File file = getFile();
  if (_isWindows && isAux())
   return false;
  else
   return file.canWrite();
 } catch (AccessControlException e) {
  log.finer(e.toString());
  return false;
 }
}

代码示例来源:origin: baratine/baratine

@Override
public boolean isFile()
{
 try {
  if (_isWindows && isAux())
   return false;
  else
   return getFile().isFile();
 } catch (AccessControlException e) {
  log.finer(e.toString());
  return false;
 }
}

代码示例来源:origin: baratine/baratine

@Override
public boolean exists()
{
 try {
  if (_isWindows && isAux())
   return false;
  else
   return getFile().exists();
 } catch (AccessControlException e) {
  log.finer(e.toString());
  return false;
 }
}

代码示例来源:origin: baratine/baratine

public boolean canWrite()
{
 try {
  File file = getFile();
  if (_isWindows && isAux())
   return false;
  else
   return file.canWrite();
 } catch (AccessControlException e) {
  log.finer(e.toString());
  return false;
 }
}

代码示例来源:origin: com.caucho/resin

log.log(Level.WARNING, e.toString(), e);

相关文章