equal
deleted
inserted
replaced
47 |
47 |
48 class UnixChannelFactory { |
48 class UnixChannelFactory { |
49 private static final JavaIOFileDescriptorAccess fdAccess = |
49 private static final JavaIOFileDescriptorAccess fdAccess = |
50 SharedSecrets.getJavaIOFileDescriptorAccess(); |
50 SharedSecrets.getJavaIOFileDescriptorAccess(); |
51 |
51 |
52 private UnixChannelFactory() { |
52 protected UnixChannelFactory() { |
53 } |
53 } |
54 |
54 |
55 /** |
55 /** |
56 * Represents the flags from a user-supplied set of open options. |
56 * Represents the flags from a user-supplied set of open options. |
57 */ |
57 */ |
58 private static class Flags { |
58 protected static class Flags { |
59 boolean read; |
59 boolean read; |
60 boolean write; |
60 boolean write; |
61 boolean append; |
61 boolean append; |
62 boolean truncateExisting; |
62 boolean truncateExisting; |
63 boolean noFollowLinks; |
63 boolean noFollowLinks; |
177 |
177 |
178 /** |
178 /** |
179 * Opens file based on parameters and options, returning a FileDescriptor |
179 * Opens file based on parameters and options, returning a FileDescriptor |
180 * encapsulating the handle to the open file. |
180 * encapsulating the handle to the open file. |
181 */ |
181 */ |
182 static FileDescriptor open(int dfd, |
182 protected static FileDescriptor open(int dfd, |
183 UnixPath path, |
183 UnixPath path, |
184 String pathForPermissionCheck, |
184 String pathForPermissionCheck, |
185 Flags flags, |
185 Flags flags, |
186 int mode) |
186 int mode) |
187 throws UnixException |
187 throws UnixException |
188 { |
188 { |
189 // map to oflags |
189 // map to oflags |
190 int oflags; |
190 int oflags; |
191 if (flags.read && flags.write) { |
191 if (flags.read && flags.write) { |