我个人认为:
首先要熟悉文件格式定义,然后按照其格式进行组织数组,至于数据库存储其实问题不大,可以用Clob型实现大图片数据存储,不知是否满意?

解决方案 »

  1.   

    首先获取数据库Connetion(这个不用教吧)例如是conn
    然后:
    PreparedStatement pstmt = conn.prepareStatement("INSERT INTO table (id, pic) VALUES (1, ?)");
    //取文件
    InputStream is = new FileInputStream("pic.jpg");
    pstmt.setBinaryStream(1,is,is.available());
    pstmt.executeUpdate();
    下面是取的
    先获得ResultSet
    ResultSet rs = stmt.executeQuery("select pic from table where id=1");
    ......
    Byte[] bytes = rs.getBytes(1);//这就取出来了