6 Replies Latest reply: Jan 21, 2009 5:06 PM by 807588 RSS

    Problem with generics....:/

      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[];
      So, How can I handle this ?

      Thank u!