Java 应用与开发 - 高级 I/O 编程大纲 Java I/O 原理 基础 I/O 流 常用 I/O 流类型 I/O 应用 Java 应用与开发 高级 I/O 编程 王晓东 wangxiaodong@ouc.edu.cn 中国海洋大学 October 29, 2018 大纲 Java I/O 原理 基础 I/O 流 常用 I/O 流类型 I/O 应用 学习目标 1. 深入理解 Java 的 I/O 原理 2. 掌握 Java Java 基本 I/O 流类型 3. 掌握 I/O 的几种应用编程方式 大纲 Java I/O 原理 基础 I/O 流 常用 I/O 流类型 I/O 应用 大纲 Java I/O 原理 基础 I/O 流 常用 I/O 流类型 I/O 应用 大纲 Java I/O 原理 基础 I/O 流 常用 I/O 流类型 I/O 应用 ���� Java I/O 原理 基础 I/O 流 常用 常用 I/O 流类型 I/O 应用 大纲 Java I/O 原理 基础 I/O 流 常用 I/O 流类型 I/O 应用 Java I/O 原理 O I/O(Input/Output)基本概念 ▶ 数据源(Data Source) ▶ 数据宿(Data Sink) ▶ 流(Stream) Java 中把不同的数据源与程序间的数据传输都抽象表述为 流,java.io 包中定义了多种 I/O 流类型实现数据0 码力 | 27 页 | 609.17 KB | 1 年前3
Nacos架构&原理
年的阿里五彩石项目,自主研发完全可控,经历十多年双 11 洪峰考验,沉淀了高性能、 高可用、可扩展的核心能力,2018 年开源后引起了开发者的广泛关注和大量使用。本书也将介绍 Nacos 偏 AP 分布式系统的设计、全异步事件驱动的高性能架构和面向失败设计的高可用设计理念 等。相信开发者阅读后不仅可以更深入了解 Nacos,也有助于提高分布式系统的设计研发能力。 阿里巴巴中间件负责人 - 胡伟琪(白慕) 阿里巴巴在 和打标能力,为实现上层流量和服务灰度非常关键。 19 > Nacos 架构 内核层 插件机制:实现三个模块可分可合能力,实现扩展点 SPI 机制,用于扩展自己公司定制。 事件机制:实现异步化事件通知,SDK 数据变化异步通知等逻辑,是 Nacos 高性能的关键部分。 日志模块:管理日志分类,日志级别,日志可移植性(尤其避免冲突),日志格式,异常码+帮 助文档。 回调机制:SDK 通知数 长链接 ⼀、现状背景 Nacos 1.x 版本 Config/Naming 模块各自的推送通道都是按照自己的设计模型来实现的。 产品 推送模型 数据⼀致性 痛点 说明 Nacos Config 异步 Servlet 基于 MD5 比 对⼀致性 http 短连接,30 秒定 期创建销毁连接,GC 压力大 md5 值计算也有⼀定 开销,在可接受范围内 Nacos Naming HTTP/UDP0 码力 | 326 页 | 12.83 MB | 9 月前3
《Java 应用与开发》课程讲义 - 王晓东. . . . 17 2.3 课后习题 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 19 i 3 Java 数组和字符串 21 3.1 数组的概念 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 100 9.5.3 File 类的主要方法 . . . . . . . . . . . . . . . . . . . . . . . . . . . . 100 9.5.4 文件 I/O 有关读写类 . . . . . . . . . . . . . . . . . . . . . . . . . . 101 9.5.5 读取文件内容 . . . . . . . . . . . . . . . . . . . . . . . . . 167 13 高级 I/O 编程 168 13.1 Java I/O 原理 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 169 13.1.1 Java I/O 原理 . . . . . . . . . . . . . . . . . . .0 码力 | 330 页 | 6.54 MB | 1 年前3
Spring Framework 1.2.6 Reference........................................................................ 121 12. Data Access using O/R Mappers ......................................................................................... object-relational mapping APIs, including JDO, Hibernate and iBatis. Using the ORM package you can use all those O/R-mappers in combination with all the other features Spring offers, like simple declarative transaction resource strings, and in simple form are treated appropriately to the specific context implementation (i.e. ClassPathXmlApplicationContext treats a simple location path as a classpath location), but may also0 码力 | 290 页 | 1.49 MB | 1 年前3
Spring Framework 1.2.x Reference........................................................................ 132 12. Data Access using O/R Mappers ......................................................................................... object-relational mapping APIs, including JDO, Hibernate and iBatis. Using the ORM package you can use all those O/R-mappers in combination with all the other features Spring offers, like simple declarative transaction resource strings, and in simple form are treated appropriately to the specific context implementation (i.e. ClassPathXmlApplicationContext treats a simple location path as a classpath location), but may also0 码力 | 289 页 | 1.50 MB | 1 年前3
Spring Framework 1.2.8 Reference........................................................................ 121 12. Data Access using O/R Mappers ......................................................................................... object-relational mapping APIs, including JDO, Hibernate and iBatis. Using the ORM package you can use all those O/R-mappers in combination with all the other features Spring offers, like simple declarative transaction resource strings, and in simple form are treated appropriately to the specific context implementation (i.e. ClassPathXmlApplicationContext treats a simple location path as a classpath location), but may also0 码力 | 290 页 | 1.49 MB | 1 年前3
Spring Framework 1.2.7 Reference........................................................................ 121 12. Data Access using O/R Mappers ......................................................................................... object-relational mapping APIs, including JDO, Hibernate and iBatis. Using the ORM package you can use all those O/R-mappers in combination with all the other features Spring offers, like simple declarative transaction resource strings, and in simple form are treated appropriately to the specific context implementation (i.e. ClassPathXmlApplicationContext treats a simple location path as a classpath location), but may also0 码力 | 290 页 | 1.49 MB | 1 年前3
Spring Framework 1.2.5 Reference........................................................................ 121 12. Data Access using O/R Mappers ......................................................................................... object-relational mapping APIs, including JDO, Hibernate and iBatis. Using the ORM package you can use all those O/R-mappers in combination with all the other features Spring offers, like simple declarative transaction resource strings, and in simple form are treated appropriately to the specific context implementation (i.e. ClassPathXmlApplicationContext treats a simple location path as a classpath location), but may also0 码力 | 290 页 | 1.49 MB | 1 年前3
Spring Framework 1.2.4 Reference........................................................................ 121 12. Data Access using O/R Mappers ......................................................................................... object-relational mapping APIs, including JDO, Hibernate and iBatis. Using the ORM package you can use all those O/R-mappers in combination with all the other features Spring offers, like simple declarative transaction resource strings, and in simple form are treated appropriately to the specific context implementation (i.e. ClassPathXmlApplicationContext treats a simple location path as a classpath location), but may also0 码力 | 289 页 | 1.49 MB | 1 年前3
Java 应用与开发 - 线程编程后台线程 线程控制 线程生命的周期 线程优先级 线程串行化 线程休眠 线程让步 线程挂起与恢复 线程等待与通知 线程的同步 大纲 线程基础 线程控制 线程的同步 相关知识回顾 概念回顾 O 任务调度 ▶ 大部分操作系统的任务调度是采用时间片轮转的抢占式调度 方式,一个任务执行一小段时间后强制暂停去执行下一个任 务,每个任务轮流执行。 ▶ CPU 的执行效率非常高,时间片非常短,在各个任务之间 快速地切换,让人感觉像是多个任务在“同时进行”,这也 就是我们所说的并发。 t Task 1 Task 2 Task 3 大纲 线程基础 线程控制 线程的同步 相关知识回顾 概念回顾 O 进程 ▶ 进程是一个具有一定独立功能的程序在一个数据集上的一次 动态执行的过程,是操作系统进行资源分配和调度的一个独 立单位,是应用程序运行的载体。 (展示类 UNIX 系统的进程树) ▶ 进程 start() 方法,启动线程。 课程配套代码 ± sample.thread.FirstThreadSample.java 大纲 线程基础 线程控制 线程的同步 创建线程 创建线程的第二种方式 O 直接继承 Thread 类创建线程 1 public class TestThread3 { 2 public static void main(String args[]) { 3 Thread0 码力 | 82 页 | 1010.73 KB | 1 年前3
共 417 条
- 1
- 2
- 3
- 4
- 5
- 6
- 42













