@Override @NonNull public byte[] readBytes(@NonNull File file) throws IOException { return mDelegate.readBytes(file); }
if (file.isFile() && path.endsWith(DOT_CLASS)) { try { byte[] bytes = client.readBytes(file); for (File dir : classFolders) { if (path.startsWith(dir.getPath())) {
if (bits == null) { try { bits = context.getClient().readBytes(file); fileContents.put(file, bits); } catch (IOException e) {
if (bits == null) { try { bits = context.getClient().readBytes(file); fileContents.put(file, bits); } catch (IOException e) {
byte[] bytes = client.readBytes(file); entries.add(new ClassEntry(file, null /* jarFile*/, binDir, bytes)); } catch (IOException e) {
byte[] bytes = client.readBytes(classFile); ClassReader reader = new ClassReader(bytes); ClassNode classNode = new ClassNode();
/** * Returns the encoded String for the given file. This is usually the * same as {@code Files.toString(file, Charsets.UTF8}, but if there's a UTF byte order mark * (for UTF8, UTF_16 or UTF_16LE), use that instead. * * @param client the client to use for I/O operations * @param file the file to read from * @param createString If true, create a {@link String} instead of a general {@link * CharSequence} * @return the string * @throws IOException if the file cannot be read properly */ @NonNull public static CharSequence getEncodedString( @NonNull LintClient client, @NonNull File file, boolean createString) throws IOException { byte[] bytes = client.readBytes(file); if (endsWith(file.getName(), DOT_XML)) { return PositionXmlParser.getXmlString(bytes); } return getEncodedString(bytes, createString); }