<?xml version="1.0" encoding="utf-8" ?><rss version="2.0"><channel><title><![CDATA[jun3518的博客]]></title><description><![CDATA[]]></description><link>https://blog.youkuaiyun.com/jun3518</link><language>zh-cn</language><generator>https://blog.youkuaiyun.com/</generator><copyright><![CDATA[Copyright &copy; jun3518]]></copyright><item><title><![CDATA[多线程之无状态对象和有状态对象]]></title><link>https://blog.youkuaiyun.com/jun3518/article/details/80294550</link><guid>https://blog.youkuaiyun.com/jun3518/article/details/80294550</guid><author>jun3518</author><pubDate>Sat, 12 May 2018 21:00:46 +0800</pubDate><description><![CDATA[从网上搜到的信息，有状态对象就是有数据存储功能的对象。无状态对象就是没有数据存储功能的对象。通俗地讲，有状态对象就是有成员变量的对象。1、无状态对象一定是线程安全的无状态对象因为不包含任何域，也不包含任何对其他类中域的引用，计算过程中的临时状态仅存在于线程栈的局部变量中，并且只能由正在执行的线程访问，当前线程不会影响到其他正在运行的线程，所以无状态对象一定是线程安全的。2、有状态对象不一定是线程不...]]></description><category></category></item><item><title><![CDATA[Struts2-获取客户端请求参数]]></title><link>https://blog.youkuaiyun.com/jun3518/article/details/80238013</link><guid>https://blog.youkuaiyun.com/jun3518/article/details/80238013</guid><author>jun3518</author><pubDate>Tue, 08 May 2018 15:03:19 +0800</pubDate><description><![CDATA[Struts2是一个优秀的MVC（Model-View-Controller）框架，其中客户端请求参数在MVC架构中作为Model的属性存在。Struts2框架有两种方式获取客户端请求的参数。1、通过属性驱动的方式获取客户端请求的参数（将Action类作为Model的方式）：（1）将POJO类作为Action类的属性，并在Action类中提供getter/setter方法：Action类代码如下：...]]></description><category></category></item><item><title><![CDATA[Struts2-关于struts.xml文件的result配置的说明]]></title><link>https://blog.youkuaiyun.com/jun3518/article/details/80156235</link><guid>https://blog.youkuaiyun.com/jun3518/article/details/80156235</guid><author>jun3518</author><pubDate>Tue, 01 May 2018 18:29:27 +0800</pubDate><description><![CDATA[一、result说明：一个result代表了一个可能的输出。当action类的方法执行完后，会返回一个字符串，Struts2框架根据这个字符串去匹配该action下的result，然后像用户输出视图（也可以是重定向，接下来会讲）。二、result的配置：result元素的属性属性是否必须说明name否指定result的逻辑名type否指定result的类型，不同类型的result代表了不同类型的结...]]></description><category></category></item><item><title><![CDATA[Struts2-关于struts.xml文件的action配置的说明]]></title><link>https://blog.youkuaiyun.com/jun3518/article/details/80153537</link><guid>https://blog.youkuaiyun.com/jun3518/article/details/80153537</guid><author>jun3518</author><pubDate>Tue, 01 May 2018 02:19:34 +0800</pubDate><description><![CDATA[一、Action的说明：Struts2的核心功能就是action，对于开发者，使用Struct2框架的主要工作就是编写Action类来实现业务。action类可以不用继承任何父类和实现任何接口，但是在开发中通过实现com.opensymphony.xwork2.Action接口（下文中以Action来替代）或者继承com.opensymphony.xwork2.ActionSupport（下文中以...]]></description><category></category></item><item><title><![CDATA[Struts2-关于struts.xml文件的package配置的说明]]></title><link>https://blog.youkuaiyun.com/jun3518/article/details/80152999</link><guid>https://blog.youkuaiyun.com/jun3518/article/details/80152999</guid><author>jun3518</author><pubDate>Tue, 01 May 2018 00:46:47 +0800</pubDate><description><![CDATA[一个较为完整的action定义：&amp;lt;struts&amp;gt;
	&amp;lt;package name=&quot;default&quot; extends=&quot;struts-default&quot;&amp;gt;
		&amp;lt;action name=&quot;test&quot; class=&quot;com.struts2.action.TestAction&quot; method=&quot;execute&quot;&amp;gt;
			&amp;lt]]></description><category></category></item><item><title><![CDATA[Struts2-使Struts2能运行起来的的简单配置]]></title><link>https://blog.youkuaiyun.com/jun3518/article/details/80152135</link><guid>https://blog.youkuaiyun.com/jun3518/article/details/80152135</guid><author>jun3518</author><pubDate>Mon, 30 Apr 2018 22:30:04 +0800</pubDate><description><![CDATA[Struts2框架想要应用于Web项目中，需要在Web项目的web.xml文件中进行一定的配置，才能在Web项目使用Struts2框架。Struts2使用的是一个过滤器：org.apache.struts2.dispatcher.ng.filter.StrutsPrepareAndExecuteFilter，这个过滤器会将前端的Http请求转发至Struts2框架中，关于此过滤器，在后面的文章用会...]]></description><category></category></item><item><title><![CDATA[（四）nio通道之文件通道（FileChannel）]]></title><link>https://blog.youkuaiyun.com/jun3518/article/details/79945817</link><guid>https://blog.youkuaiyun.com/jun3518/article/details/79945817</guid><author>jun3518</author><pubDate>Sun, 15 Apr 2018 00:34:11 +0800</pubDate><description><![CDATA[文件通道（File Channel）总是阻塞式的，因此不能被置于阻塞模式。一、FileChannel类的概述：FileChannel对象不能直接创建。一个FileChannel实例只能通过在一个打开的file对象（RandomAccessFile、FileInputStream或 FileOutputStream）上调用getChannel( )方法获取。调用getChannel( )方法会返回一...]]></description><category></category></item><item><title><![CDATA[（三）nio通道之Channel的类型、通道的创建和通道的Scatter（分散）和Gather（聚集）]]></title><link>https://blog.youkuaiyun.com/jun3518/article/details/79929235</link><guid>https://blog.youkuaiyun.com/jun3518/article/details/79929235</guid><author>jun3518</author><pubDate>Fri, 13 Apr 2018 17:14:34 +0800</pubDate><description><![CDATA[一、通道的分类：通道（Channel）是访问I/O服务的导管。I/O广义上可分为两大类：File I/O和Stream I/O。相应的会有两大类型的通道，它们分别是文件(file)通道和套接字(socket)通道。主要的文件通道有：    FileChannel：用于读取、写入、映射和操作文件的通道。主要的套接字通道有：    SocketChannel：通过 TCP 读写网络中的数据。    S...]]></description><category></category></item><item><title><![CDATA[（二）nio缓冲区之Buffer写与读]]></title><link>https://blog.youkuaiyun.com/jun3518/article/details/79916997</link><guid>https://blog.youkuaiyun.com/jun3518/article/details/79916997</guid><author>jun3518</author><pubDate>Thu, 12 Apr 2018 17:48:02 +0800</pubDate><description><![CDATA[在Buffer开辟了一块缓存之后，则可以对该缓存进行读写操作：进行开辟一块字节缓冲区，进行字节读写操作：ByteBuffer buffer = ByteBuffer.allocate(10); //在JVM内存中开辟了一块10字节的缓冲区//ByteBuffer buffer = ByteBuffer.allocateDirect(10); //在操作系统内存中开辟了一块10字节的缓冲区一、写操作...]]></description><category></category></item><item><title><![CDATA[（一）nio 缓冲区之java.nio.Buffer]]></title><link>https://blog.youkuaiyun.com/jun3518/article/details/79915413</link><guid>https://blog.youkuaiyun.com/jun3518/article/details/79915413</guid><author>jun3518</author><pubDate>Thu, 12 Apr 2018 16:26:02 +0800</pubDate><description><![CDATA[Java NIO(New IO)是一个可以替代标准Java IO API的IO API（从Java 1.4开始)，Java NIO提供了与标准IO不同的IO工作方式。由下图可知，Buffer是一个抽象类，并提供了除了Boolean以外的所有基本数据类型的封装，不过最常用的还是ByteBuffer，究其原因是因为我们对数据进行I/O操作时主要操作的就是字节。                     ...]]></description><category></category></item></channel></rss>