Categories

JAVA DATEBASE
Technology Network Community
Oracle Database
Fusion Middleware
Development Tools
Java
Desktop
Server & Storage Systems
Enterprise Management
Berkeley DB Family
Cloud Computing
Big Data
Business Intelligence
Architecture
Migration and Modernization
E-Business Suite
Siebel
PeopleSoft Enterprise
JD Edwards World
Industries
JD Edwards EnterpriseOne
User Productivity Kit Pro (UPK) and Tutor
Governance, Risk & Compliance (GRC)
Master Data Management (MDM)
Oracle CRM On Demand
On Demand: SaaS and Managed Applications
AutoVue Enterprise Visualization
Primavera
ATG
Agile PLM
Endeca Experience Management
Fusion Applications
Archived Forums

 



Tags

New To Java


Java InputStream


Dear Forum,,  I'm fairlynew to java and I would like to develop a real-time text to mysql mapper.  You see I have a stream of 5 columns coming through a linux tail, and I would like to pipe it (in linux shell) to the java app that will split the line into 5 and from there on I can manage.   I'm trying with InputStream and OutputStream but I can only get to print it on the terminal screen. Can someont point me in the right direction ?  umoorjani

If you are really piping then the input stream would be System.in.  You then wrap that in a reader - one or more of the input classes in java.io.*.  Your objective there is to read one line at a time.  You then parse each line.  Easy enough to write your self but you could also look at one of the simple parsers like StringTokenizer.  You then use JDBC (java.sql.*) to save it to the database.  You should probably size it for volume.  If there is a lot of volume you might want to thread it so you can save batches via JDBC or even consider writing it to load files which the database load tools can use as input (with large volumes of data this is often faster than JDBC.)


Related Links

How to quit the program in Java SE??
my code to print line in pascals triangle
How to repair damaged . java files
File Copy with resume enable
UML diagrams
Java "Singleton Class" Examples
Need help in Java Algorithms and DS
Help in Understanding Program
Passing constants through as an object
Spring Frame Work with NetBeans 6.9 . I need for your helping !
question about the array
New to Java please help with a program
hashMap is returning Null Key
Exception java.lang.ClassCastException: java.lang.String
web source parsing. jtextarea parsing
Java Applet general exception error