Java 类org.apache.hadoop.io.nativeio.NativeIO.Windows 实例源码

项目:hadoop    文件:WindowsSecureContainerExecutor.java   
public static OutputStream create(Path f, boolean append)  
    throws IOException {
  if (!nativeLoaded) {
    throw new IOException("Native WSCE libraries are required for create");
  }

  long desiredAccess = Windows.GENERIC_WRITE;
  long shareMode = 0L;
  long creationDisposition = append ? 
      Windows.OPEN_ALWAYS : Windows.CREATE_ALWAYS;
  long flags = Windows.FILE_ATTRIBUTE_NORMAL;

  String fileName = f.toString();
  fileName = fileName.replace('/', '\\');

  long hFile = elevatedCreateImpl(
      fileName, desiredAccess, shareMode, creationDisposition, flags);
  return new FileOutputStream(
      WinutilsProcessStub.getFileDescriptorFromHandle(hFile));
}
项目:aliyun-oss-hadoop-fs    文件:WindowsSecureContainerExecutor.java   
public static OutputStream create(Path f, boolean append)  
    throws IOException {
  if (!nativeLoaded) {
    throw new IOException("Native WSCE libraries are required for create");
  }

  long desiredAccess = Windows.GENERIC_WRITE;
  long shareMode = 0L;
  long creationDisposition = append ? 
      Windows.OPEN_ALWAYS : Windows.CREATE_ALWAYS;
  long flags = Windows.FILE_ATTRIBUTE_NORMAL;

  String fileName = f.toString();
  fileName = fileName.replace('/', '\\');

  long hFile = elevatedCreateImpl(
      fileName, desiredAccess, shareMode, creationDisposition, flags);
  return new FileOutputStream(
      WinutilsProcessStub.getFileDescriptorFromHandle(hFile));
}
项目:big-c    文件:WindowsSecureContainerExecutor.java   
public static OutputStream create(Path f, boolean append)  
    throws IOException {
  if (!nativeLoaded) {
    throw new IOException("Native WSCE libraries are required for create");
  }

  long desiredAccess = Windows.GENERIC_WRITE;
  long shareMode = 0L;
  long creationDisposition = append ? 
      Windows.OPEN_ALWAYS : Windows.CREATE_ALWAYS;
  long flags = Windows.FILE_ATTRIBUTE_NORMAL;

  String fileName = f.toString();
  fileName = fileName.replace('/', '\\');

  long hFile = elevatedCreateImpl(
      fileName, desiredAccess, shareMode, creationDisposition, flags);
  return new FileOutputStream(
      WinutilsProcessStub.getFileDescriptorFromHandle(hFile));
}
项目:hadoop-2.6.0-cdh5.4.3    文件:WindowsSecureContainerExecutor.java   
public static OutputStream create(Path f, boolean append)  
    throws IOException {
  if (!nativeLoaded) {
    throw new IOException("Native WSCE libraries are required for create");
  }

  long desiredAccess = Windows.GENERIC_WRITE;
  long shareMode = 0L;
  long creationDisposition = append ? 
      Windows.OPEN_ALWAYS : Windows.CREATE_ALWAYS;
  long flags = Windows.FILE_ATTRIBUTE_NORMAL;

  String fileName = f.toString();
  fileName = fileName.replace('/', '\\');

  long hFile = elevatedCreateImpl(
      fileName, desiredAccess, shareMode, creationDisposition, flags);
  return new FileOutputStream(
      WinutilsProcessStub.getFileDescriptorFromHandle(hFile));
}
项目:hops    文件:WindowsSecureContainerExecutor.java   
public static OutputStream create(Path f, boolean append)  
    throws IOException {
  if (!nativeLoaded) {
    throw new IOException("Native WSCE libraries are required for create");
  }

  long desiredAccess = Windows.GENERIC_WRITE;
  long shareMode = 0L;
  long creationDisposition = append ? 
      Windows.OPEN_ALWAYS : Windows.CREATE_ALWAYS;
  long flags = Windows.FILE_ATTRIBUTE_NORMAL;

  String fileName = f.toString();
  fileName = fileName.replace('/', '\\');

  long hFile = elevatedCreateImpl(
      fileName, desiredAccess, shareMode, creationDisposition, flags);
  return new FileOutputStream(
      WinutilsProcessStub.getFileDescriptorFromHandle(hFile));
}