6 Replies Latest reply: Jan 21, 2009 1:33 PM by 807588 RSS

    Problem with generics....:/

    807588
      Hi everybody.

      I have this this question: I'm developing a class that holds data in a Hashtable, defined for a generic type:
      Hashtable<E[], Integer> hs = new Hashtable<E[], Integer>();
      The generic type will be either byte[] or char[] according to the stream being processed. So, the problem is that I can't do the cast:
      FileOutputStream out ....
      byte[] x = (byte[]) E[];
      ...
      out.write(x);
      So, How can I handle this ?

      Thank u!