Results 1 to 6 of 6
  1. #1
    yuvipoy is offline Member
    Join Date
    Oct 2013
    Posts
    3
    Rep Power
    0

    Default Split the BLOB DATA based on byte array.

    How to split the BLOB into byte array in java.
    I am having a blob data i am having byte array lenght i need to split the blob based on byte length.

    say for eg blob is '0XAA4543534534D1211323235671850800787879878932178 6417CB7085751DC.....................'
    say i need to split the data into 4 parts
    part1:4 bytes
    Part2:8 bytes
    Part3:2 bytes
    part4:4 bytes

  2. #2
    Tolls is online now Moderator
    Join Date
    Apr 2009
    Posts
    12,042
    Rep Power
    20

    Default Re: Split the BLOB DATA based on byte array.

    Are you talking about a Blob as in a database type?
    If so then get the binary stream and read bytes into each of your parts.
    Please do not ask for code as refusal often offends.

    ** This space for rent **

  3. #3
    yuvipoy is offline Member
    Join Date
    Oct 2013
    Posts
    3
    Rep Power
    0

    Default Re: Split the BLOB DATA based on byte array.

    It a CLOB in database
    how to do binary stream and read bytes
    can you provide any links related to my requirement.
    since i am new to java i am unware how the binary streams will work and read each bytes.

    Thanks!

  4. #4
    Tolls is online now Moderator
    Join Date
    Apr 2009
    Posts
    12,042
    Rep Power
    20

    Default Re: Split the BLOB DATA based on byte array.

    If you're new to Java then what on earth are you doing working with LOBs?
    Besides, if it's a CLOB then that means it contains Characters as opposed to Bytes, so why are you reading bytes?
    So the Clob interface provides ways of reading characters.
    Please do not ask for code as refusal often offends.

    ** This space for rent **

  5. #5
    yuvipoy is offline Member
    Join Date
    Oct 2013
    Posts
    3
    Rep Power
    0

    Default Re: Split the BLOB DATA based on byte array.

    The data type which i have choosen is CLOB in database.

    The input for java will be of like BLOB a string with '0XAA4543534534D1211323235671850800787879878932178 ......'

    i need to read the above format and split based on byte arry length.

    Thanks!

  6. #6
    Tolls is online now Moderator
    Join Date
    Apr 2009
    Posts
    12,042
    Rep Power
    20

    Default Re: Split the BLOB DATA based on byte array.

    No, that's not a Blob. That's a Clob.
    It will be stored as characters in the database and so should be read as characters from the database.
    If you want to read Blobs then store Blobs.
    Please do not ask for code as refusal often offends.

    ** This space for rent **

Similar Threads

  1. Replies: 0
    Last Post: 06-28-2013, 08:17 AM
  2. Split String based upon the Pattern
    By pavan528 in forum New To Java
    Replies: 8
    Last Post: 10-19-2012, 10:33 AM
  3. No data after downloading pdf BLOB from Oracle db
    By reubenmk in forum Java Servlet
    Replies: 3
    Last Post: 02-23-2012, 03:06 PM
  4. How to split a file by based on size
    By kewlkeny in forum New To Java
    Replies: 3
    Last Post: 01-05-2012, 11:07 AM
  5. loading blob data in database
    By newbie123 in forum JDBC
    Replies: 5
    Last Post: 12-21-2011, 03:50 PM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •