简体   繁体   中英

Reading file from remote server using groovy

I am trying to read a specific entry in a file on a remote Linux server, I have no idea how to do it, i searched around and below is what i am trying but it doesnt work and throwing exceptions

Below is the exception i get , Can some one also confirm if the above code is OK?

 latest.groovy: 50: expecting EOF, found 'in' @ line 50, column 17.
 DataInputStream in = new DataInputStream(io)
               ^

 1 error

in is a keyword in groovy.

Change the variable name to something else...

Maybe dataInputStream ?

You can find a list of the keywords here http://docs.groovy-lang.org/latest/html/documentation/#_keywords

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM