java.lang.SecurityManager.checkRead()方法的使用及代码示例

x33g5p2x  于2022-01-29 转载在 其他  
字(3.7k)|赞(0)|评价(0)|浏览(164)

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

SecurityManager.checkRead介绍

暂无

代码示例

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

public void checkRead(final FileDescriptor fd) {
  if (doCheck()) {
    super.checkRead(fd);
  }
}

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

public void checkRead(final String file) {
  if (doCheck()) {
    super.checkRead(file);
  }
}

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

public void checkRead(final String file, final Object context) {
  if (doCheck()) {
    super.checkRead(file, context);
  }
}

代码示例来源:origin: frohoff/ysoserial

@Override
public void checkRead(FileDescriptor fd) {
  getSecurityManager().checkRead(fd);
}

代码示例来源:origin: frohoff/ysoserial

@Override
public void checkRead(String file) {
  getSecurityManager().checkRead(file);
}

代码示例来源:origin: frohoff/ysoserial

@Override
public void checkRead(String file, Object context) {
  getSecurityManager().checkRead(file, context);
}

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

@Override
public void checkRead( String file )
{
  if ( managerExists() )
  {
    securityManager.checkRead( file );
  }
  else
  {
    super.checkRead( file );
  }
}

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

@Override
public void checkRead( String file, Object context )
{
  if ( managerExists() )
  {
    securityManager.checkRead( file, context );
  }
  else
  {
    super.checkRead( file, context );
  }
}

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

@Override
public void checkRead( FileDescriptor fd )
{
  if ( managerExists() )
  {
    securityManager.checkRead( fd );
  }
  else
  {
    super.checkRead( fd );
  }
}

代码示例来源:origin: com.github.stefanbirkner/system-rules

@Override
public void checkRead(String file) {
  if (originalSecurityManager != null)
    originalSecurityManager.checkRead(file);
}

代码示例来源:origin: facebook/nailgun

/** Avoid constructing a FilePermission object in checkRead if base manager is null. */
 public void checkRead(String file) {
  if (base != null) {
   super.checkRead(file);
  }
 }
}

代码示例来源:origin: com.github.stefanbirkner/system-rules

@Override
public void checkRead(String file, Object context) {
  if (originalSecurityManager != null)
    originalSecurityManager.checkRead(file, context);
}

代码示例来源:origin: com.github.tcnh/fitnesse

@Override
public void checkRead(String file) {
 if (delegate != null) {
  delegate.checkRead(file);
 }
}

代码示例来源:origin: stefanbirkner/system-rules

@Override
public void checkRead(FileDescriptor fd) {
  if (originalSecurityManager != null)
    originalSecurityManager.checkRead(fd);
}

代码示例来源:origin: org.wildfly.security/wildfly-elytron

public void checkRead(final FileDescriptor fd) {
  if (doCheck()) {
    super.checkRead(fd);
  }
}

代码示例来源:origin: stackoverflow.com

public FileInputStream(File file) throws FileNotFoundException {
 String name = (file != null ? file.getPath() : null);
 SecurityManager security = System.getSecurityManager();
 if (security != null) {
   security.checkRead(name);
 }
   if (name == null) {
     throw new NullPointerException();
   }
 fd = new FileDescriptor();
 open(name);
 }

代码示例来源:origin: net.sf.jstuff/jstuff-core

@Override
public void checkRead(final FileDescriptor fd) {
 if (wrapped == null) {
   super.checkRead(fd);
 } else {
   wrapped.checkRead(fd);
 }
}

代码示例来源:origin: net.sf.jstuff/jstuff-core

@Override
public void checkRead(final String file, final Object context) {
 if (wrapped == null) {
   super.checkRead(file, context);
 } else {
   wrapped.checkRead(file, context);
 }
}

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

@Override
public void checkRead(final String pFile, final Object pContext) {
  try{
    super.checkRead(pFile, pContext);
  }
  catch(AccessControlException e){
    throw getException(e, InternationalizedSecurityManager.PERM_GROUP_FILE, InternationalizedSecurityManager.PERM_Read, pFile);
  }
}

代码示例来源:origin: com.aoindustries/ao-io-unix

/**
 * Adds random entropy to the kernel.
 */
public static void addEntropy(byte[] randomData) throws IOException {
  SecurityManager security=System.getSecurityManager();
  if(security!=null) security.checkRead(DEV_RANDOM_PATH);
  UnixFile.loadLibrary();
  synchronized(addEntropyLock) {
    addEntropy0(randomData);
  }
}

相关文章