How to use java to implement a webservice interface that can access linux local file data?

1. How to use java to implement a webservice interface that can access linux local file data?
2. Files are larger text files (about 2G)
3. Is there a better way, such as storing text files in an appropriate database (such as whether mongdb is appropriate or a recommended database), and then getting data from the database and returning it to the webservice interface?
4. Trouble God to share a better solution

MySQL Query : SELECT * FROM `codeshelper`.`v9_news` WHERE status=99 AND catid='6' ORDER BY rand() LIMIT 5
MySQL Error : Disk full (/tmp/#sql-temptable-64f5-1b3261c-2be39.MAI); waiting for someone to free some space... (errno: 28 "No space left on device")
MySQL Errno : 1021
Message : Disk full (/tmp/#sql-temptable-64f5-1b3261c-2be39.MAI); waiting for someone to free some space... (errno: 28 "No space left on device")
Need Help?