类com.google.common.io.LineProcessor源码实例Demo

下面列出了怎么用com.google.common.io.LineProcessor的API类实例代码及写法,或者点击链接到github查看源代码。

源代码1 项目: n4js   文件: PositiveAnalyser.java
private String withLineNumbers(String code) {
	try {
		return CharStreams.readLines(new StringReader(code), new LineProcessor<String>() {

			private final StringBuilder lines = new StringBuilder();
			private int lineNo = 1;

			@Override
			public boolean processLine(String line) throws IOException {
				lines.append(Strings.padStart(String.valueOf(lineNo++), 3, ' ')).append(": ").append(line)
						.append("\n");
				return true;
			}

			@Override
			public String getResult() {
				return lines.toString();
			}
		});
	} catch (IOException e) {
		throw new IllegalStateException(e.getMessage());
	}
}
 
源代码2 项目: purplejs   文件: CoreLibHelper.java
public void processLines( final Object stream, final Consumer<String> callback )
    throws Exception
{
    final CharSource source = toCharSource( stream );
    source.readLines( new LineProcessor<Object>()
    {
        @Override
        public boolean processLine( final String line )
            throws IOException
        {
            callback.accept( line );
            return true;
        }

        @Override
        public Object getResult()
        {
            return null;
        }
    } );
}
 
源代码3 项目: hawkbit   文件: BulkUploadHandler.java
private BigDecimal getTotalNumberOfLines() {
    try {
        return new BigDecimal(Files.readLines(tempFile, Charset.defaultCharset(), new LineProcessor<Integer>() {
            private int count;

            @Override
            public Integer getResult() {
                return count;
            }

            @Override
            public boolean processLine(final String line) {
                count++;
                return true;
            }
        }));

    } catch (final IOException e) {
        LOG.error("Error while reading temp file for upload.", e);
    }

    return new BigDecimal(0);
}
 
源代码4 项目: api-mining   文件: TextFileUtils.java
/**
 * Return the number of lines in this file.
 * 
 * @param f
 * @return
 * @throws IOException
 */
public static int numberOfLinesInFile(final File f) throws IOException {
	return Files.readLines(f, Charset.defaultCharset(),
			new LineProcessor<Integer>() {
				int count = 0;

				@Override
				public Integer getResult() {
					return count;
				}

				@Override
				public boolean processLine(final String line) {
					count++;
					return true;
				}
			});
}
 
源代码5 项目: android-test   文件: AdbController.java
private boolean apkHashMatchesInstalledApk(String apkPath, String installedApkPath)
    throws IOException {
  String apkHash = Files.asByteSource(new File(apkPath)).hash(Hashing.md5()).toString();
  Pattern hashPattern = Pattern.compile(String.format("^%s .*", apkHash));

  LineProcessor<Boolean> md5Processor = regexpProcessorBuilder
      .withPattern(hashPattern).buildRegexpPresentProcessor();
  SubprocessCommunicator.Builder builder = communicatorBuilderProvider.get()
      .withStdoutProcessor(md5Processor)
      .withStderrProcessor(md5Processor);

  makeAdbCall(
      builder,
      getDefaultTimeout(),
      "shell",
      "md5",
      installedApkPath,
      "||",
      "md5sum",
      installedApkPath);

  return md5Processor.getResult();
}
 
源代码6 项目: tassal   文件: TextFileUtils.java
/**
 * Return the number of lines in this file.
 * 
 * @param f
 * @return
 * @throws IOException
 */
public static int numberOfLinesInFile(final File f) throws IOException {
	return Files.readLines(f, Charset.defaultCharset(),
			new LineProcessor<Integer>() {
				int count = 0;

				@Override
				public Integer getResult() {
					return count;
				}

				@Override
				public boolean processLine(final String line) {
					count++;
					return true;
				}
			});
}
 
源代码7 项目: calcite   文件: MongoAdapterTest.java
private static void populate(MongoCollection<Document> collection, URL resource)
    throws IOException {
  Objects.requireNonNull(collection, "collection");

  if (collection.countDocuments() > 0) {
    // delete any existing documents (run from a clean set)
    collection.deleteMany(new BsonDocument());
  }

  MongoCollection<BsonDocument> bsonCollection = collection.withDocumentClass(BsonDocument.class);
  Resources.readLines(resource, StandardCharsets.UTF_8, new LineProcessor<Void>() {
    @Override public boolean processLine(String line) throws IOException {
      bsonCollection.insertOne(BsonDocument.parse(line));
      return true;
    }

    @Override public Void getResult() {
      return null;
    }
  });
}
 
protected static Collection<String> parseExportPackage(InputStream is) throws IOException {
  LineProcessor<List<String>> processor = new LineProcessor<List<String>>() {
    final List<String> result = new ArrayList<String>();

    @Override
    public boolean processLine(String line) throws IOException {
      result.add(line.replace('.', '/'));
      return true; // keep reading
    }

    @Override
    public List<String> getResult() {
      return result;
    }
  };
  return CharStreams.readLines(new InputStreamReader(is, Charsets.UTF_8), processor);
}
 
源代码9 项目: log-synth   文件: VinSampler.java
private static Map<String, String> mapResource(String name) throws IOException {
    final Splitter onTab = Splitter.on("\t");

    //noinspection UnstableApiUsage
    return Resources.readLines(Resources.getResource(name), Charsets.UTF_8, new LineProcessor<Map<String, String>>() {
        final Map<String, String> r = Maps.newHashMap();

        @Override
        public boolean processLine(String line) {
            Iterator<String> pieces = onTab.split(line).iterator();
            String key = pieces.next();
            r.put(key, pieces.next());
            return true;
        }

        @Override
        public Map<String, String> getResult() {
            return r;
        }
    });
}
 
源代码10 项目: log-synth   文件: VinSampler.java
private static SetMultimap<String, String> multiMapResource(String name) throws IOException {
    final Splitter onTab = Splitter.on("\t");

    //noinspection UnstableApiUsage
    return Resources.readLines(Resources.getResource(name), Charsets.UTF_8, new LineProcessor<SetMultimap<String, String>>() {
        final SetMultimap<String, String> r = HashMultimap.create();

        @Override
        public boolean processLine(String line) {
            Iterator<String> pieces = onTab.split(line).iterator();
            String key = pieces.next();
            r.put(key, pieces.next());
            return true;
        }

        @Override
        public SetMultimap<String, String> getResult() {
            return r;
        }
    });
}
 
源代码11 项目: log-synth   文件: Util.java
public static void readData(String resource, Function<String, Void> callback) throws IOException {
    //noinspection UnstableApiUsage
    Resources.readLines(Resources.getResource(resource), Charsets.UTF_8, new LineProcessor<Void>() {
        @Override
        public boolean processLine(String line) {
            if (!line.startsWith("# ")) {
                callback.apply(line);
            }
            return true;
        }

        @Override
        public Void getResult() {
            return null;
        }
    });
}
 
源代码12 项目: levelup-java-examples   文件: CountLinesTextFile.java
@Test
public void count_lines_text_file_guava() throws IOException {

	long linesCounted = com.google.common.io.Files.readLines(
			Paths.get(fileLocation).toFile(), Charsets.UTF_8,
			new LineProcessor<Long>() {

				long numberOfLinesInTextFile = 0;

				@Override
				public boolean processLine(String line) throws IOException {

					numberOfLinesInTextFile++;
					return true;
				}

				@Override
				public Long getResult() {
					return numberOfLinesInTextFile;
				}
			});

	assertEquals(10, linesCounted);
}
 
源代码13 项目: Quicksql   文件: RuntimeEnv.java
public static void init() throws IOException {
    System.out.println("Elasticsearch Embedded Server is starting up, waiting....");
    final Map<String, String> mapping = ImmutableMap.of("stu_id", "keyword", "type", "keyword",
        "city", "keyword", "digest", "long", "province", "keyword");
    NODE.createIndex("student", mapping);

    // load records from file
    final List<ObjectNode> bulk = new ArrayList<>();
    Resources.readLines(CsvJoinWithEsExample.class.getResource("/student.json"),
        StandardCharsets.UTF_8, new LineProcessor<Void>() {
            @Override public boolean processLine(String line) throws IOException {
                line = line.replaceAll("_id", "id");
                bulk.add((ObjectNode) NODE.mapper().readTree(line));
                return true;
            }

            @Override public Void getResult() {
                return null;
            }
        });

    if (bulk.isEmpty()) {
        throw new IllegalStateException("No records to index. Empty file ?");
    }

    NODE.insertBulk("student", bulk);
    System.out.println("Elasticsearch Embedded Server has started!! Your query is running...");

}
 
源代码14 项目: Quicksql   文件: SqlLogicalPlanViewTest.java
/**
 * test.
 *
 * @throws IOException io exception
 */

@BeforeClass
public static void setupInstance() throws IOException {
    final Map<String, String> mapping = ImmutableMap.of("stu_id", "long", "type", "long",
        "city", "keyword", "digest", "long", "province", "keyword");
    NODE.createIndex("student", mapping);

    // load records from file
    final List<ObjectNode> bulk = new ArrayList<>();
    Resources.readLines(QueryProcedureTest.class.getResource("/student.json"),
        StandardCharsets.UTF_8, new LineProcessor<Void>() {
            @Override
            public boolean processLine(String line) throws IOException {
                line = line.replaceAll("_id", "id");
                bulk.add((ObjectNode) NODE.mapper().readTree(line));
                return true;
            }

            @Override
            public Void getResult() {
                return null;
            }
        });

    if (bulk.isEmpty()) {
        throw new IllegalStateException("No records to index. Empty file ?");
    }

    NODE.insertBulk("student", bulk);

    producer = new QueryProcedureProducer(
        "inline: " + MetadataPostman.getCalciteModelSchema(tableNames), SqlRunner.builder());
}
 
源代码15 项目: Quicksql   文件: QueryProcedureTest.java
/**
 * test.
 *
 * @throws IOException io exception
 */

@BeforeClass
public static void setupInstance() throws IOException {
    final Map<String, String> mapping = ImmutableMap.of("stu_id", "long", "type", "long",
        "city", "keyword", "digest", "long", "province", "keyword");
    NODE.createIndex("student", mapping);

    // load records from file
    final List<ObjectNode> bulk = new ArrayList<>();
    Resources.readLines(QueryProcedureTest.class.getResource("/student.json"),
        StandardCharsets.UTF_8, new LineProcessor<Void>() {
            @Override
            public boolean processLine(String line) throws IOException {
                line = line.replaceAll("_id", "id");
                bulk.add((ObjectNode) NODE.mapper().readTree(line));
                return true;
            }

            @Override
            public Void getResult() {
                return null;
            }
        });

    if (bulk.isEmpty()) {
        throw new IllegalStateException("No records to index. Empty file ?");
    }

    NODE.insertBulk("student", bulk);

    producer = new QueryProcedureProducer(
        "inline: " + MetadataPostman.getCalciteModelSchema(tableNames), SqlRunner.builder());
}
 
源代码16 项目: xds-ide   文件: ProjectUtils.java
public static String getParseRootModuleName(XdsProjectSettings xdsProjectSettings) {
 	String compilationRootName = xdsProjectSettings.getCompilationRootName();
 	if (XdsFileUtils.isXdsProjectFile(compilationRootName)) {
 		try {
	return Files.readLines(ResourceUtils.getAbsoluteFile(getPrjFile(xdsProjectSettings)), Charset.defaultCharset(), new LineProcessor<String>() {
		final Pattern linePattern = Pattern.compile("[!]module (\\w+(?:[.]\\w{3})?)");
		String result;

		@Override
		public boolean processLine(String line) throws IOException {
			Matcher matcher = linePattern.matcher(line);
			if (matcher.find()) {
				String moduleName = matcher.group(1);
				if (XdsFileUtils.isCompilationUnitFile(moduleName) ||
						FilenameUtils.getExtension(moduleName).isEmpty()) {
					result = moduleName;
					return false;
				}
			}
			
			return true;
		}

		@Override
		public String getResult() {
			return result;
		}
	});
} catch (IOException e) {
	LogHelper.logError(e);
}
 		return null;
 	}
 	else {
 		return compilationRootName;
 	}
 }
 
源代码17 项目: react-java-goos   文件: GooGoo.java
/**
 * 读取模版文件并做变量替换
 */
private static List<String> renderTemplate(String templateFileName, final Map<String, String> params) throws MalformedURLException, IOException {
    final Pattern p = Pattern.compile("\\{(.*?)\\}");
    // 定义每行的处理逻辑
    LineProcessor<List<String>> processor = new LineProcessor<List<String>>() {

        private List<String> result = Lists.newArrayList();

        @Override
        public boolean processLine(String line) throws IOException {
            String tmp = line;
            Matcher m = p.matcher(line);
            while (m.find()) {
                String key = m.group(1);
                if (params.containsKey(key)) {
                    tmp = tmp.replaceAll("\\{" + key + "\\}", params.get(key));
                }
            }

            result.add(tmp);
            return true;
        }

        @Override
        public List<String> getResult() {
            return result;
        }
    };

    return Resources.readLines(Resources.getResource(templateFileName), Charsets.UTF_8, processor);
}
 
源代码18 项目: android-test   文件: AdbController.java
private boolean isTextPresentInProcessorResult(
    LineProcessor<List<String>> processor, String text) {
  for (String line : processor.getResult()) {
    if (line.contains(text)) {
      return true;
    }
  }
  return false;
}
 
源代码19 项目: android-test   文件: AdbController.java
/**
 * Returns {@code true} if uninstall of the given app from the device was successful.
 */
public boolean uninstallApp(String appPackageName) {
  checkNotNull(appPackageName);

  LineProcessor<List<String>> stdoutProcessor = adbLineListProvider.get();
  SubprocessCommunicator.Builder builder =
      communicatorBuilderProvider.get().withStdoutProcessor(stdoutProcessor);

  makeAdbCall(builder, getDefaultTimeout(), "uninstall", appPackageName);

  return isTextPresentInProcessorResult(stdoutProcessor, "Success");
}
 
源代码20 项目: android-test   文件: AdbController.java
/**
 * Launches an activity thru the activity manager.
 *
 * The map of extras are passed to the activity in the natural order of map iteration.
 *
 * @param action the action to send in the launching intent
 * @param activityName the android_component/activity_class_name
 * @param extras a map of key-value pairs that specify extra values to pass to the activity
 * @param waitForLaunch block till activity is launched.
 */
public void startActivity(ActivityAction action, String activityName, Map<String, String> extras,
    boolean waitForLaunch) {
  checkNotNull(action);
  checkNotNull(activityName);
  checkNotNull(extras);
  SubprocessCommunicator.Builder builder = communicatorBuilderProvider.get();
  LineProcessor<Boolean> stderrProcessor = getStartActivityErrorPresentProcessor();
  LineProcessor<Boolean> stdoutProcessor = getStartActivityErrorPresentProcessor();
  builder.withStdoutProcessor(stdoutProcessor);
  builder.withStderrProcessor(stderrProcessor);

  List<String> adbArgs = Lists.newArrayList("shell", "am", "start");
  if (waitForLaunch) {
    adbArgs.add("-W");
  }

  adbArgs.addAll(Lists.newArrayList("-a", action.getActionName(), "-n", activityName));
  if (extras != null) {
    for (Map.Entry<String, String> extra : extras.entrySet()) {
      adbArgs.add("-e");
      adbArgs.add(extra.getKey());
      adbArgs.add(extra.getValue());
    }
  }

  makeAdbCall(builder, getDefaultTimeout(), adbArgs.toArray(new String[0]));
  String checkLogs = "Could not start activity, check adb logs.";
  checkState(!stdoutProcessor.getResult(), checkLogs);
  checkState(!stderrProcessor.getResult(), checkLogs);
}
 
源代码21 项目: android-test   文件: AdbController.java
public void broadcastAction(String action, String flags, String packageName,
    Map<String, String> extras) {
  checkNotNull(action);
  SubprocessCommunicator.Builder builder = communicatorBuilderProvider.get();
  LineProcessor<Boolean> stderrProcessor = getStartActivityErrorPresentProcessor();
  LineProcessor<Boolean> stdoutProcessor = getStartActivityErrorPresentProcessor();
  builder.withStdoutProcessor(stdoutProcessor);
  builder.withStderrProcessor(stderrProcessor);

  List<String> adbArgs = Lists.newArrayList("shell", "am", "broadcast");

  adbArgs.add("-a");
  adbArgs.add(action);
  if (device.getApiVersion() > 16) {
    adbArgs.add("-f");
    adbArgs.add(flags);
  }
  for (Map.Entry<String, String> extra : extras.entrySet()) {
    adbArgs.add("-e");
    adbArgs.add(extra.getKey());
    adbArgs.add(extra.getValue());
  }
  // explicitly send this to our package. (only supported after API level 10)
  if (device.getApiVersion() > 10) {
    adbArgs.add(packageName);
  }
  logger.info("Broadcast cmdline: " + adbArgs);
  makeAdbCall(builder, getDefaultTimeout(), adbArgs.toArray(new String[0]));
  String checkLogs = "Could not broadcast, check adb logs.";
  checkState(!stdoutProcessor.getResult(), checkLogs);
  checkState(!stderrProcessor.getResult(), checkLogs);
}
 
源代码22 项目: android-test   文件: AdbController.java
private String getApkPathForInstalledApp(String appPackageName) {
  LineProcessor<String> lineProcessor = regexpProcessorBuilder
      .withPattern(PATH_PATTERN).buildFirstMatchProcessor();
  SubprocessCommunicator.Builder builder = communicatorBuilderProvider.get()
      .withStdoutProcessor(lineProcessor)
      .withStderrProcessor(lineProcessor);

  makeAdbCall(
      builder, getShortDefaultTimeout(), "shell", "pm", "path", appPackageName, "||", "true");
  return lineProcessor.getResult();
}
 
源代码23 项目: Mixin   文件: MappingProviderSrg.java
@Override
public void read(final File input) throws IOException {
    // Locally scoped to avoid synthetic accessor
    final BiMap<String, String> packageMap = this.packageMap;
    final BiMap<String, String> classMap = this.classMap;
    final BiMap<MappingField, MappingField> fieldMap = this.fieldMap;
    final BiMap<MappingMethod, MappingMethod> methodMap = this.methodMap;

    Files.readLines(input, Charset.defaultCharset(), new LineProcessor<String>() {
        @Override
        public String getResult() {
            return null;
        }
        
        @Override
        public boolean processLine(String line) throws IOException {
            if (Strings.isNullOrEmpty(line) || line.startsWith("#")) {
                return true;
            }

            String type = line.substring(0, 2);
            String[] args = line.substring(4).split(" ");

            if (type.equals("PK")) {
                packageMap.forcePut(args[0], args[1]);
            } else if (type.equals("CL")) {
                classMap.forcePut(args[0], args[1]);
            } else if (type.equals("FD")) {
                fieldMap.forcePut(new MappingFieldSrg(args[0]).copy(), new MappingFieldSrg(args[1]).copy());
            } else if (type.equals("MD")) {
                methodMap.forcePut(new MappingMethod(args[0], args[1]), new MappingMethod(args[2], args[3]));
            } else {
                throw new MixinException("Invalid SRG file: " + input);
            }
            
            return true;
        }
    });
}
 
源代码24 项目: calcite   文件: MatchTest.java
/**
 * Used to create {@code zips} index and insert zip data in bulk.
 * @throws Exception when instance setup failed
 */
@BeforeAll
public static void setup() throws Exception {
  final Map<String, String> mapping = ImmutableMap.of("city", "text", "state",
      "keyword", "pop", "long");

  NODE.createIndex(ZIPS, mapping);

  // load records from file
  final List<ObjectNode> bulk = new ArrayList<>();
  Resources.readLines(ElasticSearchAdapterTest.class.getResource("/zips-mini.json"),
      StandardCharsets.UTF_8, new LineProcessor<Void>() {
        @Override public boolean processLine(String line) throws IOException {
          line = line.replace("_id", "id"); // _id is a reserved attribute in ES
          bulk.add((ObjectNode) NODE.mapper().readTree(line));
          return true;
        }

        @Override public Void getResult() {
          return null;
        }
      });

  if (bulk.isEmpty()) {
    throw new IllegalStateException("No records to index. Empty file ?");
  }

  NODE.insertBulk(ZIPS, bulk);
}
 
源代码25 项目: calcite   文件: ElasticSearchAdapterTest.java
/**
 * Used to create {@code zips} index and insert zip data in bulk.
 * @throws Exception when instance setup failed
 */
@BeforeAll
public static void setupInstance() throws Exception {
  final Map<String, String> mapping = ImmutableMap.of("city", "keyword", "state",
      "keyword", "pop", "long");

  NODE.createIndex(ZIPS, mapping);

  // load records from file
  final List<ObjectNode> bulk = new ArrayList<>();
  Resources.readLines(ElasticSearchAdapterTest.class.getResource("/zips-mini.json"),
      StandardCharsets.UTF_8, new LineProcessor<Void>() {
        @Override public boolean processLine(String line) throws IOException {
          line = line.replace("_id", "id"); // _id is a reserved attribute in ES
          bulk.add((ObjectNode) NODE.mapper().readTree(line));
          return true;
        }

        @Override public Void getResult() {
          return null;
        }
      });

  if (bulk.isEmpty()) {
    throw new IllegalStateException("No records to index. Empty file ?");
  }

  NODE.insertBulk(ZIPS, bulk);
}
 
源代码26 项目: buck   文件: Symbols.java
public static ImmutableSet<String> getDtNeeded(
    ProcessExecutor executor, Tool objdump, SourcePathResolverAdapter resolver, Path lib)
    throws IOException, InterruptedException {
  ImmutableSet.Builder<String> builder = ImmutableSet.builder();

  Pattern re = Pattern.compile("^ *NEEDED *(\\S*)$");

  runObjdump(
      executor,
      objdump,
      resolver,
      lib,
      ImmutableList.of("-p"),
      new LineProcessor<Unit>() {
        @Override
        public boolean processLine(String line) {
          Matcher m = re.matcher(line);
          if (!m.matches()) {
            return true;
          }
          builder.add(m.group(1));
          return true;
        }

        @Override
        public Unit getResult() {
          return Unit.UNIT;
        }
      });

  return builder.build();
}
 
源代码27 项目: buck   文件: Symbols.java
private static void runObjdump(
    ProcessExecutor executor,
    Tool objdump,
    SourcePathResolverAdapter resolver,
    Path lib,
    ImmutableList<String> flags,
    LineProcessor<Unit> lineProcessor)
    throws IOException, InterruptedException {
  ImmutableList<String> args =
      ImmutableList.<String>builder()
          .addAll(objdump.getCommandPrefix(resolver))
          .addAll(flags)
          .add(lib.toString())
          .build();

  ProcessExecutorParams params =
      ProcessExecutorParams.builder()
          .setCommand(args)
          .setRedirectError(ProcessBuilder.Redirect.INHERIT)
          .build();
  ProcessExecutor.LaunchedProcess p = executor.launchProcess(params);
  BufferedReader output = new BufferedReader(new InputStreamReader(p.getStdout()));
  CharStreams.readLines(output, lineProcessor);
  ProcessExecutor.Result result = executor.waitForLaunchedProcess(p);

  if (result.getExitCode() != 0) {
    throw new RuntimeException(result.getMessageForUnexpectedResult("Objdump"));
  }
}
 
源代码28 项目: neoscada   文件: BufferLoader.java
public static List<IoBuffer> loadBuffersFromResource ( final Class<?> clazz, final String resourceName ) throws IOException
{
    logger.debug ( "Loading buffer - {}", resourceName );

    final URL url = Resources.getResource ( clazz, resourceName );

    return Resources.readLines ( url, Charset.forName ( "UTF-8" ), new LineProcessor<List<IoBuffer>> () {

        private final List<IoBuffer> result = new LinkedList<> ();

        private IoBuffer buffer = null;

        protected void pushBuffer ()
        {
            if ( this.buffer == null )
            {
                return;
            }

            this.buffer.flip ();
            this.result.add ( this.buffer );

            this.buffer = null;
        }

        @Override
        public boolean processLine ( String line ) throws IOException
        {
            line = line.replaceAll ( "#.*", "" ); // clear comments

            if ( line.isEmpty () )
            {
                pushBuffer ();
                return true;
            }

            final String[] toks = line.split ( "\\s+" );

            if ( toks.length <= 0 )
            {
                pushBuffer ();
                return true;
            }

            if ( this.buffer == null )
            {
                // start a new buffer
                this.buffer = IoBuffer.allocate ( 0 );
                this.buffer.setAutoExpand ( true );
            }

            for ( final String tok : toks )
            {
                this.buffer.put ( Byte.parseByte ( tok, 16 ) );
            }
            return true;
        }

        @Override
        public List<IoBuffer> getResult ()
        {
            pushBuffer (); // last chance to add something
            return this.result;
        }
    } );
}
 
源代码29 项目: android-test   文件: SubprocessCommunicator.java
public Builder withStdoutProcessor(LineProcessor<?> stdoutProcessor) {
  this.stdoutProcessor = stdoutProcessor;
  return this;
}
 
源代码30 项目: android-test   文件: SubprocessCommunicator.java
public Builder withStderrProcessor(LineProcessor<?> stderrProcessor) {
  this.stderrProcessor = stderrProcessor;
  return this;
}