- 博客(16)
- 收藏
- 关注
转载 IO流分析
IO流:1.字符流1.1 Reader (抽象类)1.1.1 BufferedReader 带有缓冲区字符输入流1.1.2 InputStreamReader 字符输入转换流1.1.2.1 FileReader 文件字符输入流1.1.3 StringReader 从一个String读1.1.4 PipedReader 管道输入流1.1.5 ByteArrayReader1.1.6 CharArra...
2019-09-16 11:06:01
80
转载 java集合源码分析
List,Set,Map都是接口,前两个继承Collection接口,Map为独立接口Set的实现由HashSet,LinkedHashSet,TreeSetList下有ArrayList,Vector,LinkedListMap下有Hashtable,LinkedHashMap,HashMap,TreeMapCollection还有Queue接口,实现有PriorityQueueArrayLi...
2019-09-03 17:38:36
89
转载 Vector源码分析
//初始化为10protected Object[] elementData;//大小protected int elementCount;//默认是0,可通过构造器传入protected int capacityIncrement;public Vector() {this(10);}//添加了synchronizedpublic synchronized boolean add(E e)...
2019-09-03 17:33:46
72
转载 TreeMap源码分析
/**The comparator used to maintain order in this tree map, ornull if it uses the natural ordering of its keys.@serial*///自然排序private final Comparator<? super K> comparator;//根节点private tr...
2019-09-03 17:32:48
71
转载 LinkedList源码分析
//双端队列//大小transient int size = 0;//第一个节点元素transient Node<E> first;//最后一个节点元素transient Node<E> last;public LinkedList() {}private static class Node<E> {E item;Node<E> next;Nod...
2019-09-03 17:31:55
70
转载 HashTable源码分析
/**The hash table data.*///存放键值对的数组private transient Entry<?,?>[] table;/**The total number of entries in the hash table.*///大小private transient int count;/**The table is rehashed when...
2019-09-03 17:29:32
107
转载 ArrayList的源码分析
/**Default initial capacity.初始化容量为10 */private static final int DEFAULT_CAPACITY = 10;private static final Object[] EMPTY_ELEMENTDATA = {};/**Shared empty array instance used for default sized emp...
2019-08-29 15:20:15
77
转载 springboot启动源码解析
/*SpringApplication*///构造器初始化public SpringApplication(ResourceLoader resourceLoader, Class... primarySources) {this.sources = new LinkedHashSet();//横幅模式 OFF,CONSOLE,LOG;this.bannerMode = Mode.CONSOLE...
2019-08-08 14:37:35
68
转载 jcsh中SFTP
<dependency><groupId>com.jcraft</groupId><artifactId>jsch</artifactId><version>0.1.54</version></dependency>//利用ChannelSftp 类中的方法 可以实现SFTP操作private st...
2019-08-08 14:31:28
200
转载 HashMap源码解析
/**/static final int DEFAULT_INITIAL_CAPACITY = 1 << 4;//16 默认初始化容量为16static final int MAXIMUM_CAPACITY = 1 << 30;//最大容量static final float DEFAULT_LOAD_FACTOR = 0.75f;//默认负载因子static final ...
2019-07-31 15:07:55
72
转载 java.util.concurrent包的拆解
java.util.concurrent包:1.locks部分:显式锁(互斥锁和速写锁)相关2.atomic部分:原子变量类相关,是构建非阻塞算法的基础3.executor部分:线程池相关4.collection部分:并发容器相关5.tools部分:同步工具相关,如信号量、闭锁、栅栏等功能1.collection部分:1.1 BlockingQueueBlockingQueue为接口,如果要用它...
2019-07-08 17:44:07
82
转载 xml和bean之间转化
xml和bean之间转化//bean@XmlRootElement(name = "register")br/>@XmlAccessorType(XmlAccessType.PROPERTY)@XmlType(propOrder = {"name","age" })public class User {private String name;private String age;public...
2019-07-04 17:51:17
111
转载 HTML转成pdf
HTML转成pdf:<!-- pdf 相关jar包 --><dependency><groupId>com.itextpdf</groupId><artifactId>itextpdf</artifactId><version>5.5.13</version></dependency><...
2019-07-04 17:49:48
125
转载 sql执行顺序及性能优化
sql语句的执行步骤:1.语法分析2.语义分析3.视图转换4.表达式转换5.选择优化器6.选择连接方式7.选择连接顺序8.选择数据的搜索路径9.运行“执行计划”sql查询处理的步骤:(8)SELECT(9)DISTINCT(11)<TOP_specification><select_list>(1)FROM <left_table>(3)<join_ty...
2019-07-04 17:48:31
118
转载 java基础
java获取当前路径的几种 方法:String property = System.getProperty("user.dir");//获取当前项目路径System.out.println(property);File file=new File(".");try {String canonicalPath = file.getCanonicalPath();//相对路径String ab=fil...
2019-07-03 14:05:55
46
转载 @Transactional不起作用
@Transactional不起作用:1.静态方法2.自调用方法,3.非public修饰的方法自调用方法:public void test5(Integer ver) {br/>test55(ver);}@Transactionalpublic void test55(Integer ver){EfRegisterPreWarning efRegisterPreWarning=new EfR...
2019-07-01 11:18:09
123
空空如也
空空如也
TA创建的收藏夹 TA关注的收藏夹
TA关注的人