288289290291292293294295296297298
Log.warn(t); //if (handler.hasException()) //Log.warn(handler.getException()); if (Log.isDebugEnabled()) Log.debug("Buffer content: \r\n" + HexString.toDetailedHexString(buffer.array(), buffer.length())); } } catch (Exception e) { Log.warn(e);
9899100101102103104105106107108
buffer.put(r, 0, r.length); buffer.put(SipGrammar.CRLF); } else { buffer.put(line.array(), 0, SipVersions.SIP_2_0_BUFFER.length() + 5); byte[] r = reason.getBytes(); buffer.put(r, 0, r.length); buffer.put(SipGrammar.CRLF); } }
148149150151152153154155156157158
Log.warn(t); //if (handler.hasException()) //Log.warn(handler.getException()); if (Log.isDebugEnabled()) Log.debug("Buffer content: \r\n" + HexString.toDetailedHexString(buffer.array(), p.getLength())); } } public SipConnection getConnection(InetAddress address, int port)
8485868788899091929394
{ synchronized (_lock) { _out.write(generateInfoLine(direction, connection, System.currentTimeMillis()).getBytes()); Buffer buffer = generateMessage(message); _out.write(buffer.array(), 0, buffer.length()); _out.write(StringUtil.__LINE_SEPARATOR.getBytes()); _out.flush(); } }
494495496497498499500501502503504
/* ------------------------------------------------------------ */ public InputStream getInputStream() throws IOException { Buffer indirect = getIndirectBuffer(); if (indirect!=null && indirect.array()!=null) return new ByteArrayInputStream(indirect.array(),indirect.getIndex(),indirect.length()); return _resource.getInputStream(); }
495496497498499500501502503504505
/* ------------------------------------------------------------ */ public InputStream getInputStream() throws IOException { Buffer indirect = getIndirectBuffer(); if (indirect!=null && indirect.array()!=null) return new ByteArrayInputStream(indirect.array(),indirect.getIndex(),indirect.length()); return _resource.getInputStream(); } /* ------------------------------------------------------------ */