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

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

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

SecurityManager.checkWrite介绍

暂无

代码示例

代码示例来源:origin: apache/hive

/**
 *
 */
public HiveDriver() {
 // TODO Auto-generated constructor stub
 SecurityManager security = System.getSecurityManager();
 if (security != null) {
  security.checkWrite("foobah");
 }
}

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

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

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

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

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

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

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

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

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

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

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

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

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

public boolean canWrite() {
SecurityManager security = System.getSecurityManager();
if (security != null) {
  security.checkWrite(path);
}
return fs.checkAccess(this, FileSystem.ACCESS_WRITE);
}

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

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

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

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

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

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

代码示例来源:origin: org.fitnesse/fitnesse

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

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

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

代码示例来源:origin: org.eclipse/org.eclipse.ant.core

public void checkWrite(FileDescriptor fd) {
  if (fSecurityManager != null) {
    fSecurityManager.checkWrite(fd);
  }
}

代码示例来源:origin: com.facebook.presto.hive/hive-apache-jdbc

/**
 *
 */
public HiveDriver() {
 // TODO Auto-generated constructor stub
 SecurityManager security = System.getSecurityManager();
 if (security != null) {
  security.checkWrite("foobah");
 }
}

代码示例来源:origin: org.rythmengine/rythm-engine

@Override
public void checkWrite(String file) {
  safeCheckFile(file, writable);
  if (null != csm) csm.checkWrite(file);
  if (null != osm) osm.checkWrite(file);
}

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

@Override
public void checkWrite(final String pFile) {
  try{
    super.checkWrite(pFile);
  }
  catch(AccessControlException e){
    throw getException(e, InternationalizedSecurityManager.PERM_GROUP_FILE, InternationalizedSecurityManager.PERM_Write);
  }
}

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

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

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

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

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

@Override
public void checkWrite(final String file) {
 if (wrapped == null) {
   super.checkWrite(file);
 } else {
   wrapped.checkWrite(file);
 }
}

相关文章