2021年10月21日
摘要:
FileCopyUtils public static final int BUFFER_SIZE = 4096; #public static int copy(File in, File out) throws IOException #public static void copy(byte[
阅读全文
posted @ 2021-10-21 09:36
icodegarden
阅读(221)
推荐(0)
2021年10月19日
摘要:
FastByteArrayOutputStream 性能版的ByteArrayOutputStream,跟ResizableByteArrayOutputStream不同的是他继承的是OutputStream。 使用ArrayDeque<byte[]>作为容器。 他性能高的原因在于写入新数据时,不会
阅读全文
posted @ 2021-10-19 17:56
icodegarden
阅读(6898)
推荐(0)
2021年10月15日
摘要:
InstanceFilter 一个简单的匹配器,子类可以覆盖match方法自定义match规则 private final Collection<? extends T> includes; private final Collection<? extends T> excludes; privat
阅读全文
posted @ 2021-10-15 16:48
icodegarden
阅读(36)
推荐(0)
摘要:
DigestUtils 更多更能推荐使用Apache CAMONS #public static byte[] md5Digest(byte[] bytes) #public static byte[] md5Digest(InputStream inputStream) #public stati
阅读全文
posted @ 2021-10-15 16:27
icodegarden
阅读(138)
推荐(0)
摘要:
PropertiesPersister Properties读写的策略接口 DefaultPropertiesPersister 默认实现类,所有方法都委托java.util.Properties的方法 ResourcePropertiesPersister 支持在spring.properties
阅读全文
posted @ 2021-10-15 16:18
icodegarden
阅读(160)
推荐(0)
摘要:
ConcurrentReferenceHashMap 官方描述:一个Concurrent的HashMap,对键和值使用软引用或弱引用。在并发访问时支持更好的性能,可用作Collections.synchronizedMap(new WeakHashMap<K,Reference<V>>())的替代品
阅读全文
posted @ 2021-10-15 11:26
icodegarden
阅读(813)
推荐(0)
2021年10月14日
摘要:
ConcurrentLruCache 并发堆内缓存,使用LRU缓存淘汰策略(最近最少使用) private final int sizeLimit; 缓存数量限制,可以是0表示不走缓存 private final Function<K, V> generator; 缓存数据生成 private fi
阅读全文
posted @ 2021-10-14 15:18
icodegarden
阅读(372)
推荐(0)
2021年10月12日
摘要:
ConcurrencyThrottleSupport 用于限制对特定资源的并发访问的支持类。 设计用作基类,子类在其工作流的适当位置调用beforeAccess()和afterAccess()方法。注意,afterAccess通常应该在finally块中调用! 此支持类的默认并发限制为-1(“无界并
阅读全文
posted @ 2021-10-12 14:30
icodegarden
阅读(62)
推荐(0)
摘要:
CompositeIterator 可包括多个Iterator的Iterator Set<Iterator<E>> iterators = new LinkedHashSet<>(); #public void add(Iterator<E> iterator) 新增一个iterator,同一个it
阅读全文
posted @ 2021-10-12 13:38
icodegarden
阅读(82)
推荐(0)
摘要:
CollectionUtils static final float DEFAULT_LOAD_FACTOR = 0.75f; #public static boolean isEmpty(@Nullable Collection<?> collection) null或empty #public
阅读全文
posted @ 2021-10-12 13:22
icodegarden
阅读(83)
推荐(0)