diff --git a/net.html b/net.html index 03419ddce..728f50c33 100644 --- a/net.html +++ b/net.html @@ -252,7 +252,7 @@ }

  . HttpRequest 对象

-
public class HttpRequest {
+            
public class HttpRequest {
 
     //获取客户端地址IP
     public SocketAddress getRemoteAddress();
@@ -279,6 +279,9 @@
     //更新sessionid
     public String changeSessionid();
 
+    //指定值更新sessionid
+    public String changeSessionid(String newsessionid);
+
     //使sessionid失效
     public void invalidateSession();
 
@@ -315,6 +318,46 @@
     //截取getRequestURI最后的一个/后面的部分
     public String getRequstURILastPath();
 
+    // 获取请求URL最后的一个/后面的部分的short值   <br>
+    // 例如请求URL /pipes/record/query/2   <br>
+    // 获取type参数: short type = request.getRequstURILastPath((short)0); //type = 2
+    public short getRequstURILastPath(short defvalue);
+
+    // 获取请求URL最后的一个/后面的部分的short值   <br>
+    // 例如请求URL /pipes/record/query/2   <br>
+    // 获取type参数: short type = request.getRequstURILastPath((short)0); //type = 2
+    public short getRequstURILastPath(int radix, short defvalue);
+
+    // 获取请求URL最后的一个/后面的部分的int值   <br>
+    // 例如请求URL /pipes/record/query/2   <br>
+    // 获取type参数: int type = request.getRequstURILastPath(0); //type = 2
+    public int getRequstURILastPath(int defvalue);
+
+    // 获取请求URL最后的一个/后面的部分的int值   <br>
+    // 例如请求URL /pipes/record/query/2   <br>
+    // 获取type参数: int type = request.getRequstURILastPath(0); //type = 2
+    public int getRequstURILastPath(int radix, int defvalue);
+
+    // 获取请求URL最后的一个/后面的部分的float值   <br>
+    // 例如请求URL /pipes/record/query/2   <br>
+    // 获取type参数: float type = request.getRequstURILastPath(0.f); //type = 2.f
+    public float getRequstURILastPath(float defvalue);
+
+    // 获取请求URL最后的一个/后面的部分的long值   <br>
+    // 例如请求URL /pipes/record/query/2   <br>
+    // 获取type参数: long type = request.getRequstURILastPath(0L); //type = 2
+    public long getRequstURILastPath(long defvalue);
+
+    // 获取请求URL最后的一个/后面的部分的long值   <br>
+    // 例如请求URL /pipes/record/query/2   <br>
+    // 获取type参数: long type = request.getRequstURILastPath(0L); //type = 2
+    public long getRequstURILastPath(int radix, long defvalue);
+
+    // 获取请求URL最后的一个/后面的部分的double值   <br>
+    // 例如请求URL /pipes/record/query/2   <br>
+    // 获取type参数: double type = request.getRequstURILastPath(0.0); //type = 2.0
+    public double getRequstURILastPath(double defvalue);
+
     //从prefix之后截取getRequestURI再对"/"进行分隔
     public String[] getRequstURIPaths(String prefix);
 
@@ -457,24 +500,24 @@
 
     //获取指定的参数double值, 没有返回默认double值
     public double getDoubleParameter(String name, double defaultValue);
-    
+
     //获取翻页对象 同 getFlipper("flipper", false, 0);
     public org.redkale.source.Flipper getFlipper();
-    
+
     //获取翻页对象 同 getFlipper("flipper", needcreate, 0);
     public org.redkale.source.Flipper getFlipper(boolean needcreate);
-    
+
     //获取翻页对象 同 getFlipper("flipper", false, maxLimit);
     public org.redkale.source.Flipper getFlipper(int maxLimit);
-    
+
     //获取翻页对象 同 getFlipper("flipper", needcreate, maxLimit)
     public org.redkale.source.Flipper getFlipper(boolean needcreate, int maxLimit);
-    
+
     //获取翻页对象 http://redkale.org/pipes/records/list/offset:0/limit:20/sort:createtime%20ASC
     //http://redkale.org/pipes/records/list?flipper={'offset':0,'limit':20, 'sort':'createtime ASC'}
     //以上两种接口都可以获取到翻页对象
     public org.redkale.source.Flipper getFlipper(String name, boolean needcreate, int maxLimit);
-    
+
     //获取HTTP上下文对象
     public HttpContext getContext();
 
@@ -497,7 +540,7 @@
 
 
             

  . HttpResponse 对象

-
public class HttpResponse {
+            
public class HttpResponse {
 
     //增加Cookie值
     public HttpResponse addCookie(HttpCookie... cookies);
@@ -578,6 +621,9 @@
     //以404状态码输出
     public void finish404();
 
+    //将指定byte[]按响应结果输出
+    public void finish(final byte[] bs);
+
     //将指定ByteBuffer按响应结果输出
     public void finish(ByteBuffer buffer);
 
@@ -600,6 +646,7 @@
 
     //HttpResponse回收时回调的监听方法
     public void setRecycleListener(BiConsumer<HttpRequest, HttpResponse> recycleListener);
+
 }