我有一个函数,其返回类型是VOID,它直接在控制台上打印.
但是我需要输出字符串,以便我可以处理它.
因为我无法使用返回类型的函数进行任何更改是VOID所以我必须将该输出重定向到字符串.
如何在JAVA中重定向?
关于将stdout重定向到字符串有很多问题,但它们仅重定向来自用户的输入而不是某些函数的输出...
您好我已经在Google应用引擎中创建了示例问候应用.
现在我正在尝试使用批量加载器上传数据.
但它给出了BadRequestError.This代码:
D:\Study\M.Tech\Summer\Research\My Work\Query Transformation\Experiment\Tools\Bu
lkloader\bulkloader test>appcfg.py create_bulkloader_config --url=http://bulkex.
appspot.com/remote_api --application=bulkex --filename=config.yml
Creating bulkloader configuration.
[INFO ] Logging to bulkloader-log-20111008.175810
[INFO ] Throttling transfers:
[INFO ] Bandwidth: 250000 bytes/second
[INFO ] HTTP connections: 8/second
[INFO ] Entities inserted/fetched/modified: 20/second
[INFO ] Batch Size: 10
[INFO ] Opening database: bulkloader-progress-20111008.175810.sql3
[INFO ] Opening database: bulkloader-results-20111008.175810.sql3
[INFO ] Connecting to bulkex.appspot.com/remote_api
Please enter login credentials for bulkex.appspot.com
Email: shyam.rk22@gmail.com
Password for shyam.rk22@gmail.com:
[INFO ] Downloading kinds: ['__Stat_PropertyType_PropertyName_Kind__']
[ERROR ] [WorkerThread-3] WorkerThread: …Run Code Online (Sandbox Code Playgroud) 我想在JAVA中找到特定的字符串,我正在使用CONTAINS函数.
但是CONTAINS的问题在于,即使有一个超级字符串可用于该字符串,它也是真的.
例如,说
String i = "anand > 5 or id < 6"
Run Code Online (Sandbox Code Playgroud)
我想检查字符串是否包含AND或OR.但是i.contains("and")因为anand,这里会给出真实的.
如何解决这个问题?
库中有可用的功能吗?