title: cast an object to byteArray
body: <p>i have a function </p>
  
  <pre><code>   public static Object receviceSigAndData (Socket s) {
         byte[] data = null;
         try {
              DataInputStream din2 = new DataInputStream(s.getInputStream());
              int sig_len = 0;
              sig_len = din2.readInt();
              byte[] sig = new byte[sig_len];
              din2.readFully(sig);
              int data_len = 0;
              data_len = din2.readInt();
              data = new byte[data_len];     
              dsa.update(data);
  
  
         } catch (IOException ioe) {
                  ioe.printStackTrace();
         } catch (Exception e) {
                  e.printStackTrace();
         }
  
         return (Object)data;
     }
  </code></pre>
  
  <p>the function return an object, if the object is byte array, how do i cast the object to <code>byte[]</code>?</p>
  
  <pre><code>byte[] b = (?)receviceSigAndData (socket);
  </code></pre>
  
  <p>thanks</p>