Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- import java.io.FileOutputStream;
- import java.io.IOException;
- import java.io.InputStream;
- import java.io.OutputStream;
- import java.sql.Blob;
- import java.sql.Connection;
- import java.sql.DriverManager;
- import java.sql.PreparedStatement;
- import java.sql.ResultSet;
- import java.sql.SQLException;
- public class webaruhaz
- {
- private static final int buffersize = 4096;
- public static void main(String[] args) {
- String url = "jdbc:mysql://localhost:3306/contactdb";
- String user = "root";
- String password = "secret";
- public class file{ //// file megnyitás
- private Scanner in;
- public void fileOpen(){
- try{
- in = new Scanner(new File("Basket.txt"));
- }
- catch(Excetption e){
- System.out.println("Could not find file!");
- }
- }
- public void fileRead(){ //// adatolvasás
- while(in.hasNext()){
- int trxId = in.next();
- int itemId = in.next();
- short quantity = in.next();
- String itemName = in.next();
- String description = in.next();
- }
- }
- public void fileClose(){
- in.close();
- }
- public void fileOpenEnd(){
- private Scanner out;
- try{
- out = new Scanner(new File("Sale.txt"));
- }
- catch(Excetption e){
- System.out.println("Could not find file!");
- }
- }
- public void addReceipt(){
- out.format("%s%s","trxId","summ") //// ez adja meg a végösszeget
- }
- public void fileClose(){
- out.close();
- }
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement