@Test public void testResourceToChars(){ char[] hasSubArray = ArrayHelper.resourceToChars("validC32.xml"); Assert.assertNotNull(hasSubArray); }
public static char[] resourceToChars(String resourcePath){ ClassLoader loader = Thread.currentThread().getContextClassLoader(); InputStream is = loader.getResourceAsStream(resourcePath); char[] chars = new char[0]; try { chars = IOUtils.toCharArray(is); } catch (IOException e) { throw new DS4PException(e.toString(), e); } return chars; }
ArrayHelper { public static char[] resourceToChars(String resourcePath){ ClassLoader loader = Thread.currentThread().getContextClassLoader(); InputStream is = loader.getResourceAsStream(resourcePath); char[] chars = new char[0]; try { chars = IOUtils.toCharArray(is); } catch (IOException e) { throw new DS4PException(e.toString(), e); } return chars; } }
ArrayHelper { public static char[] resourceToChars(String resourcePath){ ClassLoader loader = Thread.currentThread().getContextClassLoader(); InputStream is = loader.getResourceAsStream(resourcePath); char[] chars = new char[0]; try { chars = IOUtils.toCharArray(is); } catch (IOException e) { throw new DS4PException(e.toString(), e); } return chars; }  }
ArrayHelper { public static char[] resourceToChars(String resourcePath){ ClassLoader loader = Thread.currentThread().getContextClassLoader(); InputStream is = loader.getResourceAsStream(resourcePath); char[] chars = new char[0]; try { chars = IOUtils.toCharArray(is); } catch (IOException e) { throw new DS4PException(e.toString(), e); } return chars; }  static boolean hasSubArray(byte[] array, byte[] arrayToFind); static char[] resourceToChars(String resourcePath); static byte[] resourceToBytes(String resourcePath); }
ArrayHelper { public static char[] resourceToChars(String resourcePath){ ClassLoader loader = Thread.currentThread().getContextClassLoader(); InputStream is = loader.getResourceAsStream(resourcePath); char[] chars = new char[0]; try { chars = IOUtils.toCharArray(is); } catch (IOException e) { throw new DS4PException(e.toString(), e); } return chars; }  static boolean hasSubArray(byte[] array, byte[] arrayToFind); static char[] resourceToChars(String resourcePath); static byte[] resourceToBytes(String resourcePath);  }