Examples of readFully()


Examples of java.io.DataInputStream.readFully()

            } else {
                javacProcess(javaFile);
            }
            byte[] data = new byte[(int) classFile.length()];
            DataInputStream in = new DataInputStream(new FileInputStream(classFile));
            in.readFully(data);
            in.close();
            return data;
        } catch (Exception e) {
            throw DbException.convert(e);
        } finally {
View Full Code Here

Examples of java.io.DataInputStream.readFully()

                long length = file.length();
                if (length < Integer.MAX_VALUE) {
                    byte[] classbytes = new byte[(int)length];
                    DataInputStream in =
                        new DataInputStream(new FileInputStream(file));
                    in.readFully(classbytes);
                    in.close();
                    Class c = defineClass(null, classbytes, 0, (int) length);
                    if (c != null) {
                        resolveClass(c);
                        return c;
View Full Code Here

Examples of java.io.DataInputStream.readFully()

       
        if ( atype == 1 ){
         
          byte[]  bytes = new byte[4];
         
          dis.readFully( bytes );
         
          relay_address = InetAddress.getByAddress( bytes );
         
        }else if ( atype == 3 ){
         
View Full Code Here

Examples of java.io.DataInputStream.readFully()

         
          byte  len = dis.readByte();
         
          byte[] bytes = new byte[(int)len&0xff ];
         
          dis.readFully( bytes );
         
          relay_address = InetAddress.getByName( new String( bytes ));
         
        }else{
         
View Full Code Here

Examples of java.io.DataInputStream.readFully()

         
        }else{
         
          byte[]  bytes = new byte[16];
         
          dis.readFully( bytes );
         
          relay_address = InetAddress.getByAddress( bytes );

        }
       
View Full Code Here

Examples of java.io.DataInputStream.readFully()

            if (tmp != null) length = Integer.parseInt(tmp);
         }
         //System.out.println("readBodyContent: Length=" + length);
         byte[] ret = new byte[length];
         DataInputStream in = new DataInputStream(req.getInputStream());
         in.readFully(ret);
         return ret;
      }
      catch (Exception ex) {
         ex.printStackTrace();
         return new byte[0];
View Full Code Here

Examples of java.io.DataInputStream.readFully()

                KeyManagerFactory.getInstance(keystoreKeyManagerFactoryAlgorithm)
            KeyStore ks = KeyStore.getInstance(keyStoreType);
            FileInputStream fis = new FileInputStream(keyStoreLocation);
            DataInputStream dis = new DataInputStream(fis);
            byte[] bytes = new byte[dis.available()];
            dis.readFully(bytes);
            ByteArrayInputStream bin = new ByteArrayInputStream(bytes);
           
            KeyManager[] keystoreManagers = null;
            if (keyStorePassword != null) {
                try {
View Full Code Here

Examples of java.io.DataInputStream.readFully()

                    //  Get frame delay
                    long nanos = in.readLong();

                    //  Get frame image
                    byte[] b = new byte[(int)length];
                    in.readFully(b,0,(int)length);
                    ImageIcon icon = new ImageIcon(b);

                    //  Update CachingControl
                    cache.addToProgress(16 + length);
View Full Code Here

Examples of java.io.DataInputStream.readFully()

                    //  Read in the delay for the frame
                    long nanos = in.readLong();

                    //  Read in the frame image
                    byte[] b = new byte[(int)length];
                    in.readFully(b,0,(int)length);
                    ImageIcon icon = new ImageIcon(b);

                    //  Create a MultiImageFrame object and add to vector
                    MultiImageFrame m = new MultiImageFrame(icon, nanos);
                    frameVector.addElement(m);
View Full Code Here

Examples of java.io.DataInputStream.readFully()

            long length = stream.getContentLength();

            if( length != SourceStream.LENGTH_UNKNOWN ) {
                //  Load the entire text file into a byte array
                b = new byte[(int)length];
                in.readFully(b,0,(int)length);
            } else {
                System.err.println(
                    "Unknown content length while reading data");

                postEvent(
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.