Package java.io

Examples of java.io.DataOutputStream.writeByte()


       
        dos.writeByte( (byte)5 ); // version
        dos.writeByte( (byte)3 ); // udp associate
        dos.writeByte( (byte)0 ); // reserved
       
        dos.writeByte((byte)1);
        dos.write( new byte[4] );
       
        dos.writeShort( (short)delegate.getPort()); // port
       
        dos.flush();
View Full Code Here


          // actual address if this is a secure one (e.g. I2P one)
       
        ByteArrayOutputStream  baos_temp     = new ByteArrayOutputStream();
        DataOutputStream    dos_temp  = new DataOutputStream( baos_temp );
 
        dos_temp.writeByte(0)// resv
        dos_temp.writeByte(0)// resv       
        dos_temp.writeByte(0)// frag (none)
 
        try {
          byte[] ip_bytes = HostNameToIPResolver.syncResolve( mapped_ip ).getAddress();
View Full Code Here

       
        ByteArrayOutputStream  baos_temp     = new ByteArrayOutputStream();
        DataOutputStream    dos_temp  = new DataOutputStream( baos_temp );
 
        dos_temp.writeByte(0)// resv
        dos_temp.writeByte(0)// resv       
        dos_temp.writeByte(0)// frag (none)
 
        try {
          byte[] ip_bytes = HostNameToIPResolver.syncResolve( mapped_ip ).getAddress();
 
View Full Code Here

        ByteArrayOutputStream  baos_temp     = new ByteArrayOutputStream();
        DataOutputStream    dos_temp  = new DataOutputStream( baos_temp );
 
        dos_temp.writeByte(0)// resv
        dos_temp.writeByte(0)// resv       
        dos_temp.writeByte(0)// frag (none)
 
        try {
          byte[] ip_bytes = HostNameToIPResolver.syncResolve( mapped_ip ).getAddress();
 
          dos_temp.writeByte( ip_bytes.length==4?(byte)1:(byte)4 );
View Full Code Here

        dos_temp.writeByte(0)// frag (none)
 
        try {
          byte[] ip_bytes = HostNameToIPResolver.syncResolve( mapped_ip ).getAddress();
 
          dos_temp.writeByte( ip_bytes.length==4?(byte)1:(byte)4 );
          dos_temp.write( ip_bytes );
 
         
        }catch( Throwable e ){
                   
View Full Code Here

          dos_temp.write( ip_bytes );
 
         
        }catch( Throwable e ){
                   
          dos_temp.writeByte( (byte)3 )// address type = domain name
          dos_temp.writeByte( (byte)mapped_ip.length() )// address type = domain name
          dos_temp.write( mapped_ip.getBytes() );
 
        }
 
View Full Code Here

 
         
        }catch( Throwable e ){
                   
          dos_temp.writeByte( (byte)3 )// address type = domain name
          dos_temp.writeByte( (byte)mapped_ip.length() )// address type = domain name
          dos_temp.write( mapped_ip.getBytes() );
 
        }
 
        dos_temp.writeShort( (short)target.getPort() ); // port
View Full Code Here

      byte[] pa = convertCharToByte((char[]) data.get1DJavaArray(char.class));
      outStream.write(pa, 0 , pa.length);

    } else if (classType == byte.class) {
      while (iterA.hasNext())
        outStream.writeByte(iterA.getByteNext());

    } else if (classType == boolean.class) {
      while (iterA.hasNext())
        outStream.writeBoolean(iterA.getBooleanNext());
View Full Code Here

      while (iterA.hasNext())
        outStream.writeChar(iterA.getCharNext());

    } else if (classType == byte.class) {
      while (iterA.hasNext())
        outStream.writeByte(iterA.getByteNext());

    } else if (classType == boolean.class) {
      while (iterA.hasNext())
        outStream.writeBoolean(iterA.getBooleanNext());
View Full Code Here

    synchronized (file) {
      DataOutputStream out = new DataOutputStream(new FileOutputStream(file));

      try {
        out.write(MAGIC_NUMBER);
        out.writeByte(FILE_FORMAT_VERSION);

        for (Namespace ns : namespacesMap.values()) {
          out.writeUTF(ns.getName());
          out.writeUTF(ns.getPrefix());
        }
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.