Package java.io

Examples of java.io.DataOutputStream.writeUTF()


            daos.writeInt(event.getBody().length);
            daos.write(event.getBody(), 0, event.getBody().length);
            daos.writeInt(event.getHeaders().size());
            for (Map.Entry<String, String> entry : headers.entrySet()) {
                daos.writeUTF(entry.getKey());
                daos.writeUTF(entry.getValue());
            }
            byte[] eventData = baos.toByteArray();
            if (secretKey != null) {
                Cipher cipher = Cipher.getInstance("AES");
                cipher.init(Cipher.ENCRYPT_MODE, secretKey);
View Full Code Here


        while (iter.hasNext())
        {
            InetAddress destination = iter.next();
            CompactEndpointSerializationHelper.serialize(destination, dos);
            String id = MessagingService.instance().addCallback(handler, message, destination, message.getTimeout());
            dos.writeUTF(id);
            logger.trace("Adding FWD message to {}@{}", id, destination);
        }
        message = message.withParameter(RowMutation.FORWARD_TO, bos.toByteArray());
        // send the combined message + forward headers
        String id = MessagingService.instance().sendRR(message, target, handler);
View Full Code Here

                readToFile(in, temp, length);
            }
            in.close();
        } catch (IOException e) {
            DataOutputStream out = new DataOutputStream(response.getOutputStream());
            out.writeUTF("ERROR: "+e.getMessage());
            out.close();
            return;
        }
        DataOutputStream out = new DataOutputStream(response.getOutputStream());
        out.writeUTF("OK");
View Full Code Here

            out.writeUTF("ERROR: "+e.getMessage());
            out.close();
            return;
        }
        DataOutputStream out = new DataOutputStream(response.getOutputStream());
        out.writeUTF("OK");
        out.writeInt(fileCount);
        for (int i = 0; i < names.length; i++) {
            out.writeUTF(names[i]);
        }
        out.flush();
View Full Code Here

        }
        DataOutputStream out = new DataOutputStream(response.getOutputStream());
        out.writeUTF("OK");
        out.writeInt(fileCount);
        for (int i = 0; i < names.length; i++) {
            out.writeUTF(names[i]);
        }
        out.flush();
        out.close();
    }
View Full Code Here

            try
            {
                dos.writeInt(arguments.size());
                for(Map.Entry<String,String> arg : arguments.entrySet())
                {
                    dos.writeUTF(arg.getKey());
                    dos.writeUTF(arg.getValue());
                }
            }
            catch (IOException e)
            {
View Full Code Here

            {
                dos.writeInt(arguments.size());
                for(Map.Entry<String,String> arg : arguments.entrySet())
                {
                    dos.writeUTF(arg.getKey());
                    dos.writeUTF(arg.getValue());
                }
            }
            catch (IOException e)
            {
                // This should never happen
View Full Code Here

        while (iter.hasNext())
        {
            InetAddress destination = iter.next();
            CompactEndpointSerializationHelper.serialize(destination, dos);
            String id = MessagingService.instance().addCallback(handler, message, destination, message.getTimeout());
            dos.writeUTF(id);
        }
        message = message.withParameter(RowMutation.FORWARD_TO, bos.toByteArray());
        // send the combined message + forward headers
        Tracing.trace("Enqueuing message to {}", target);
        MessagingService.instance().sendRR(message, target, handler);
View Full Code Here

       
        BinaryMessage msg = new BinaryMessage(indexName.length()+10);
        DataOutputStream os = msg.getOs();
        os.writeInt(BinaryMessage.TYPE_INDEX);
        os.writeInt(eventType);
        os.writeUTF(indexName);
       
        msgList.add(msg);
    }
   
}
View Full Code Here

        dos.writeBoolean(hashSeed);
        dos.write(oid);
        dos.writeBoolean(sparse);
        dos.writeBoolean(fastFp);
        dos.write(polyType);
        dos.writeUTF(hashAlg.getAlgorithmName());
    }


    public int hashCode()
    {
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.