Jump to content
Search In
  • More options...
Find results that contain...
Find results in...

amintha1992

Bronze Contributor
  • Content Count

    1,507
  • Joined

  • Last visited

Awards


About amintha1992

  • Title
    friendly neighborhood nerd
  • Birthday 1992-07-25

Contact Methods

  • Twitter
    @amintha1992

Profile Information

  • Gender
    Male
  • Location
    Edmonton, Canada

System

  • CPU
    Intel Core i5 2500k @4.6Ghz
  • Motherboard
    ASUS P8Z77-V
  • RAM
    Kinston HyperX 1600mhz 8Gb
  • GPU
    ASUS HD7970 DCII
  • Case
    Antec 100 with Custom Mods
  • Storage
    SanDisk 250GB+250GB RAID0, OCZ Vertex 4 250GB, Barracuda 2TB
  • PSU
    Corsair CX600m Custom Sleeved
  • Display(s)
    X-Star 27 inch 2560x1440p
  • Cooling
    Thermaltake Water 2.0 120mm AIO liquid cooler
  • Keyboard
    Razer Blackwidow 2013
  • Mouse
    Razer Deathadder 2013
  • Sound
    ASUS Xonar DX7.1
  • Operating System
    Windows 8.1

Recent Profile Visitors

The recent visitors block is disabled and is not being shown to other users.

  1. amintha1992

    JavaEE Byte[] from database - need help

    Didnt try that. ill check.
  2. amintha1992

    JavaEE Byte[] from database - need help

    the image is stored as a BLOB on the DB. if only i can get that BLOB from the DB out as a binaryStream then it can be converted in to a byte[] and displayed on the jsf page. where im stuck is getting that binarystream from the DB for the image.
  3. amintha1992

    JavaEE Byte[] from database - need help

    anyway, got to go to bed now. have to go to work in the morning. please leave anything you can to help me out. thank you so much.
  4. amintha1992

    JavaEE Byte[] from database - need help

    yes i tried that, and all its showing is the same part that the print line showed, no picture. i also did some changes to the getImageById in the service class. here is the code public byte[] getImageById(int categoryID) { Category category = entityManager.find(Category.class, categoryID); byte[] img = category.getPicture(); System.out.println(img); return img; } it seems to work just fine and now the only problem is how to get the full byte[ ] and showing it as an image thanks for help
  5. amintha1992

    JavaEE Byte[] from database - need help

    not an error, but all im getting from that query is this,(i got it from a prinnt line) [B@c8a7334] or a slightly different one for all the other records in the table
  6. amintha1992

    JavaEE Byte[] from database - need help

    i did some more testing and have narrowed down the problem, the ImageBean and the getImageById is only reached sometimes, when the page is loaded, so that is a problem. and i dont know how to get an array of Bytes out of a data base in java.
  7. amintha1992

    JavaEE Byte[] from database - need help

    sorry my friend, this is for a school project and all i know is that information that i have already given. database was given to us all set up to use, i know its running wildfly server, but not sure whats the database is.
  8. I'm trying to display an image that's stored in the database as byte[ ]. I need to retrieve and display it on a java faces page. here is what I have so far. all its showing in the column in just blank. Table column from the XHTML page <b:dataTableColumn> <f:facet name="header"> Image </f:facet> <o:graphicImage value="#{imageBean.getBytes(category.categoryID)}" /> </b:dataTableColumn> controller to get populate the column @Named @ApplicationScoped public class imageBean { @Inject private CategoryService service; public byte[] getBytes(int categoryID) { return service.getImageById(categoryID); } } and the Service Class @Stateful public class CategoryService { ........ ..... .... public byte[] getImageById(int categoryID) { //BufferedImage img = null; String queryString = "SELECT c FROM Category WHERE c.categoryID =" + categoryID; return (byte[]) entityManager.createQuery(queryString).getSingleResult(); <<<<<<<<<< this is where im having problem.... i think } } how do i correctly get the Byte[ ] out of the database?
  9. awesome work Brandon.... really enjoyed the review. and it was very informative.
  10. amintha1992

    We're out of ideas (Pre-production Job Announcement)

    @nicklmg quick question, Do I reply to the email i got with the instructions, or is there a different place to submit the application? thanks.
  11. amintha1992

    AMD Polaris Giveaway

    well im using a HD7970, a now upgrade will go a long way with playing the latest titles.
  12. amintha1992

    LG PF1000U Ultra Short Throw Projector Giveaway

    that is just too cool. too cool.
  13. their API is not available for new developers. they are building a new one and only the older API keys work.
  14. looking for a free/trial news or RSS feed API that can do what google feed did. either JSON or XML format not too complicated to use because not a lot of time to implement it. I would even settle for a service that search for RSS feeds from a keyword and give me a bunch of RSS feed links.
×