Package java.io

Examples of java.io.DataOutputStream.writeUTF()


   
    static void checkFixedDelimited(String str) throws Exception
    {
        ByteArrayOutputStream bout = new ByteArrayOutputStream();
        DataOutputStream dout = new DataOutputStream(bout);
        dout.writeUTF(str);
        dout.close();
       
        ByteArrayOutputStream out = new ByteArrayOutputStream();
        LinkedBuffer lb = new LinkedBuffer(BUF_SIZE);
        WriteSession session = new WriteSession(lb);
View Full Code Here


   
    static void checkFixedDelimited(String str) throws Exception
    {
        ByteArrayOutputStream bout = new ByteArrayOutputStream();
        DataOutputStream dout = new DataOutputStream(bout);
        dout.writeUTF(str);
        dout.close();
       
        ByteArrayOutputStream out = new ByteArrayOutputStream();
        LinkedBuffer lb = new LinkedBuffer(BUF_SIZE);
        WriteSession session = new WriteSession(lb);
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

            final FileOutputStream fos = new FileOutputStream(fileName);
            final BufferedOutputStream bos = new BufferedOutputStream(fos);
            dos = new DataOutputStream(bos);
            dos.writeInt(map.size());
            for (final Map.Entry<String, ConcurrentMap<String, PluginType>> outer : map.entrySet()) {
                dos.writeUTF(outer.getKey());
                dos.writeInt(outer.getValue().size());
                for (final Map.Entry<String, PluginType> entry : outer.getValue().entrySet()) {
                    dos.writeUTF(entry.getKey());
                    final PluginType pt = entry.getValue();
                    dos.writeUTF(pt.getPluginClass().getName());
View Full Code Here

            dos.writeInt(map.size());
            for (final Map.Entry<String, ConcurrentMap<String, PluginType>> outer : map.entrySet()) {
                dos.writeUTF(outer.getKey());
                dos.writeInt(outer.getValue().size());
                for (final Map.Entry<String, PluginType> entry : outer.getValue().entrySet()) {
                    dos.writeUTF(entry.getKey());
                    final PluginType pt = entry.getValue();
                    dos.writeUTF(pt.getPluginClass().getName());
                    dos.writeUTF(pt.getElementName());
                    dos.writeBoolean(pt.isObjectPrintable());
                    dos.writeBoolean(pt.isDeferChildren());
View Full Code Here

                dos.writeUTF(outer.getKey());
                dos.writeInt(outer.getValue().size());
                for (final Map.Entry<String, PluginType> entry : outer.getValue().entrySet()) {
                    dos.writeUTF(entry.getKey());
                    final PluginType pt = entry.getValue();
                    dos.writeUTF(pt.getPluginClass().getName());
                    dos.writeUTF(pt.getElementName());
                    dos.writeBoolean(pt.isObjectPrintable());
                    dos.writeBoolean(pt.isDeferChildren());
                }
            }
View Full Code Here

                dos.writeInt(outer.getValue().size());
                for (final Map.Entry<String, PluginType> entry : outer.getValue().entrySet()) {
                    dos.writeUTF(entry.getKey());
                    final PluginType pt = entry.getValue();
                    dos.writeUTF(pt.getPluginClass().getName());
                    dos.writeUTF(pt.getElementName());
                    dos.writeBoolean(pt.isObjectPrintable());
                    dos.writeBoolean(pt.isDeferChildren());
                }
            }
        } catch (final Exception ex) {
View Full Code Here

            DataOutputStream daos = new DataOutputStream(baos);
            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");
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.