test_class.declarator: mockContext
test_class.original_string: Context mockContext;
test_class.type: Context
test_class.var_name: mockContext
test_class.declarator: mockAssets
test_class.original_string: AssetManager mockAssets;
test_class.type: AssetManager
test_class.var_name: mockAssets
test_class.declarator: testResult
test_class.original_string: int testResult;
test_class.type: int
test_class.var_name: testResult
test_class.file: app/src/test/java/org/jak_linux/dns66/FileHelperTest.java
test_class.identifier: FileHelperTest
test_case.body: @Test
      public void testOpenItemFile() throws Exception {
          Configuration.Item item = new Configuration.Item();
          // Test encoding fails
          item.location = "hexample.com";
          assertNull(FileHelper.openItemFile(mockContext, item));
      }
test_case.class_method_signature: FileHelperTest.testOpenItemFile()
test_case.full_signature: @Test public void testOpenItemFile()
test_case.identifier: testOpenItemFile
test_case.invocations: assertNull openItemFile
test_case.modifiers: @Test public
test_case.parameters: ()
test_case.return: void
test_case.signature: void testOpenItemFile()
focal_class.file: app/src/main/java/org/jak_linux/dns66/FileHelper.java
focal_class.identifier: FileHelper
focal_class.class_method_signature: FileHelper.openRead(Context context, String filename)
focal_class.full_signature: public static InputStream openRead(Context context, String filename)
focal_class.identifier: openRead
focal_class.modifiers: public static
focal_class.parameters: (Context context, String filename)
focal_class.return: InputStream
focal_class.signature: InputStream openRead(Context context, String filename)
focal_class.class_method_signature: FileHelper.openWrite(Context context, String filename)
focal_class.full_signature: public static OutputStream openWrite(Context context, String filename)
focal_class.identifier: openWrite
focal_class.modifiers: public static
focal_class.parameters: (Context context, String filename)
focal_class.return: OutputStream
focal_class.signature: OutputStream openWrite(Context context, String filename)
focal_class.class_method_signature: FileHelper.readConfigFile(Context context, String name, boolean defaultsOnly)
focal_class.full_signature: private static Configuration readConfigFile(Context context, String name, boolean defaultsOnly)
focal_class.identifier: readConfigFile
focal_class.modifiers: private static
focal_class.parameters: (Context context, String name, boolean defaultsOnly)
focal_class.return: Configuration
focal_class.signature: Configuration readConfigFile(Context context, String name, boolean defaultsOnly)
focal_class.class_method_signature: FileHelper.loadCurrentSettings(Context context)
focal_class.full_signature: public static Configuration loadCurrentSettings(Context context)
focal_class.identifier: loadCurrentSettings
focal_class.modifiers: public static
focal_class.parameters: (Context context)
focal_class.return: Configuration
focal_class.signature: Configuration loadCurrentSettings(Context context)
focal_class.class_method_signature: FileHelper.loadPreviousSettings(Context context)
focal_class.full_signature: public static Configuration loadPreviousSettings(Context context)
focal_class.identifier: loadPreviousSettings
focal_class.modifiers: public static
focal_class.parameters: (Context context)
focal_class.return: Configuration
focal_class.signature: Configuration loadPreviousSettings(Context context)
focal_class.class_method_signature: FileHelper.loadDefaultSettings(Context context)
focal_class.full_signature: public static Configuration loadDefaultSettings(Context context)
focal_class.identifier: loadDefaultSettings
focal_class.modifiers: public static
focal_class.parameters: (Context context)
focal_class.return: Configuration
focal_class.signature: Configuration loadDefaultSettings(Context context)
focal_class.class_method_signature: FileHelper.writeSettings(Context context, Configuration config)
focal_class.full_signature: public static void writeSettings(Context context, Configuration config)
focal_class.identifier: writeSettings
focal_class.modifiers: public static
focal_class.parameters: (Context context, Configuration config)
focal_class.return: void
focal_class.signature: void writeSettings(Context context, Configuration config)
focal_class.class_method_signature: FileHelper.getItemFile(Context context, Configuration.Item item)
focal_class.full_signature: public static File getItemFile(Context context, Configuration.Item item)
focal_class.identifier: getItemFile
focal_class.modifiers: public static
focal_class.parameters: (Context context, Configuration.Item item)
focal_class.return: File
focal_class.signature: File getItemFile(Context context, Configuration.Item item)
focal_class.class_method_signature: FileHelper.openItemFile(Context context, Configuration.Item item)
focal_class.full_signature: public static InputStreamReader openItemFile(Context context, Configuration.Item item)
focal_class.identifier: openItemFile
focal_class.modifiers: public static
focal_class.parameters: (Context context, Configuration.Item item)
focal_class.return: InputStreamReader
focal_class.signature: InputStreamReader openItemFile(Context context, Configuration.Item item)
focal_class.class_method_signature: FileHelper.poll(StructPollfd[] fds, int timeout)
focal_class.full_signature: public static int poll(StructPollfd[] fds, int timeout)
focal_class.identifier: poll
focal_class.modifiers: public static
focal_class.parameters: (StructPollfd[] fds, int timeout)
focal_class.return: int
focal_class.signature: int poll(StructPollfd[] fds, int timeout)
focal_class.class_method_signature: FileHelper.closeOrWarn(FileDescriptor fd, String tag, String message)
focal_class.full_signature: public static FileDescriptor closeOrWarn(FileDescriptor fd, String tag, String message)
focal_class.identifier: closeOrWarn
focal_class.modifiers: public static
focal_class.parameters: (FileDescriptor fd, String tag, String message)
focal_class.return: FileDescriptor
focal_class.signature: FileDescriptor closeOrWarn(FileDescriptor fd, String tag, String message)
focal_class.class_method_signature: FileHelper.closeOrWarn(T fd, String tag, String message)
focal_class.full_signature: public static T closeOrWarn(T fd, String tag, String message)
focal_class.identifier: closeOrWarn
focal_class.modifiers: public static
focal_class.parameters: (T fd, String tag, String message)
focal_class.return: T
focal_class.signature: T closeOrWarn(T fd, String tag, String message)
focal_method.body: public static InputStreamReader openItemFile(Context context, Configuration.Item item) throws FileNotFoundException {
          if (item.location.startsWith("content://")) {
              try {
                  return new InputStreamReader(context.getContentResolver().openInputStream(Uri.parse(item.location)));
              } catch (SecurityException e) {
                  Log.d("FileHelper", "openItemFile: Cannot open", e);
                  throw new FileNotFoundException(e.getMessage());
              }
          } else {
              File file = getItemFile(context, item);
              if (file == null)
                  return null;
              if (item.isDownloadable())
                  return new InputStreamReader(new SingleWriterMultipleReaderFile(getItemFile(context, item)).openRead());
              return new FileReader(getItemFile(context, item));
          }
      }
focal_method.class_method_signature: FileHelper.openItemFile(Context context, Configuration.Item item)
focal_method.full_signature: public static InputStreamReader openItemFile(Context context, Configuration.Item item)
focal_method.identifier: openItemFile
focal_method.invocations: startsWith openInputStream getContentResolver parse d getMessage getItemFile isDownloadable openRead getItemFile getItemFile
focal_method.modifiers: public static
focal_method.parameters: (Context context, Configuration.Item item)
focal_method.return: InputStreamReader
focal_method.signature: InputStreamReader openItemFile(Context context, Configuration.Item item)