分享
首先分享一份学习大纲,内容较多,涵盖了互联网行业所有的流行以及核心技术,以截图形式分享:
(亿级流量性能调优实战+一线大厂分布式实战+架构师筑基必备技能+设计思想开源框架解读+性能直线提升架构技术+高效存储让项目性能起飞+分布式扩展到微服务架构…实在是太多了)
其次分享一些技术知识,以截图形式分享一部分:
Tomcat架构解析:
算法训练+高分宝典:
Spring Cloud+Docker微服务实战:
最后分享一波面试资料:
切莫死记硬背,小心面试官直接让你出门右拐
1000道互联网Java面试题:
Java高级架构面试知识整理:
*/
@Slf4j
public class SVGConverterUtils {
public static void main(String[] args) throws Exception {
String svgpath = “E:\svgfile\c.svg”;
File svgFile = new File(svgpath);
String name = svgFile.getName();
name = name.substring(0, name.lastIndexOf(“.”));
// converter.svg2PDF(new File(svgpath), new File(“E:/” + name + “_SVG文件转PDF.pdf”));
// converter.svg2PNG(new File(svgpath), new File(“E:/” + name + “_SVG文件转PNG.png”));
svg2JPEG(new File(svgpath), new File(“E:/” + name + “_SVG文件转JPG.jpg”));
String svgCode = svg2String(new File(svgpath));
// converter.svg2PDF(svgCode, “D:/” + name + “_SVG代码转PDF.pdf”);
// converter.svg2PNG(svgCode, “D:/” + name + “_SVG代码转PNG.png”);
// converter.svg2JPEG(svgCode, “D:/” + name + “_SVG代码转JPG.jpg”);
// converter.svg2PDF(svgCode, new FileOutputStream(new File(“E:/svgfile/” + name + “_SVG代码转输出流.pdf”)));
// converter.svg2PNG(svgCode, new FileOutputStream(new File(“E:/svgfile/” + name + “_SVG代码转输出流.png”)));
// converter.svg2JPEG(svgCode, new FileOutputStream(new File(“E:/svgfile/” + name + “_SVG代码转输出流.jpg”)));
// converter.svg2EPS(svgCode, new FileOutputStream(new File(“E:/svgfile/” + name + “_SVG代码转输出流.eps”)));
// converter.svg2PS(svgCode, new FileOutputStream(new File(“E:/svgfile/” + name + “_SVG代码转输出流.ps”)));
svgtoeps(svgCode, new FileOutputStream(new File(“E:/svgfile/” + name + “_SVG代码转输出流.eps”)));
}
public static File svgFileChangeJpg(File svgFile, String jpgPath){
log.info(“========svgFileChangeJpg.jpgPath:” + jpgPath);
try {
File file = new File(jpgPath);
if (file.exists()) {
file.delete();
}else {
file.getParentFile().mkdir();
file.createNewFile();
}
log.info(“========svgFileChangeJpg.jpgFile:” + file);
log.info(“========svgFileChangeJpg.svgFile:” + svgFile);
svg2JPEG(svgFile, file);
return file;
} catch (Exception e) {
log.error(e.getMessage());
}
return null;
}
public static void svgtoeps(String svgCode, OutputStream os){
EPSTranscoder epsTranscoder = new EPSTranscoder();
try {
svgCode = svgCode.replaceAll(“:rect”, “rect”);
TranscoderInput input = new TranscoderInput(new ByteArrayInputStream(svgCode.getBytes()));
TranscoderOutput output = new TranscoderOutput(os);
epsTranscoder.transcode(input, output);
os.flush();
os.close();
} catch (Exception e) {
}
}
/**
-
SVG转PNG
-
@param svgCode SVG代码
-
@param outpath 输出路径
-
@throws TranscoderException
-
@throws IOException
*/
public void svg2PNG(String svgCode, String outpath) throws TranscoderException, IOException {
Transcoder transcoder = new PNGTranscoder();
svgConverte(svgCode, outpath, transcoder);
}
/**
-
SVG转PNG
-
@param svgCode SVG代码
-
@param out 输出流
-
@throws TranscoderException
-
@throws IOException
*/
public void svg2PNG(String svgCode, OutputStream out) throws TranscoderException, IOException {
Transcoder transcoder = new PNGTranscoder();
svgConverte(svgCode, out, transcoder);
}
/**
-
SVG转PNG
-
@param svgFile SVG文件
-
@param outFile 输出文件
-
@throws TranscoderException
-
@throws IOException
*/
public void svg2PNG(File svgFile, File outFile) throws TranscoderException, IOException {
Transcoder transcoder = new PNGTranscoder();
svgConverte(svgFile, outFile, transcoder);
}
/**
-
SVG转JPG
-
@param svgCode SVG代码
-
@param outpath 输出路径
-
@throws TranscoderException
-
@throws IOException
*/
public void svg2JPEG(String svgCode, String outpath) throws TranscoderException, IOException {
Transcoder transcoder = new JPEGTranscoder();
//为防止ERROR: The JPEG quality has not been specified. Use the default one: no compression 错误,需如下配置
transcoder.addTranscodingHint(JPEGTranscoder.KEY_QUALITY, 0.99f);
svgConverte(svgCode, outpath, transcoder);
}
/**
-
SVG转JPG
-
@param svgCode SVG代码
-
@param out 输出流
-
@throws TranscoderException
-
@throws IOException
*/
public void svg2JPEG(String svgCode, OutputStream out) throws TranscoderException, IOException {
Transcoder transcoder = new JPEGTranscoder();
//为防止ERROR: The JPEG quality has not been specified. Use the default one: no compression 错误,需如下配置
transcoder.addTranscodingHint(JPEGTranscoder.KEY_QUALITY, 0.99f);
svgConverte(svgCode, out, transcoder);
}
/**
-
SVG转JPG
-
@param svgFile SVG文件
-
@param outFile 输出文件
-
@throws TranscoderException
-
@throws IOException
*/
public static void svg2JPEG(File svgFile, File outFile) throws TranscoderException, IOException {
Transcoder transcoder = new JPEGTranscoder();
//为防止ERROR: The JPEG quality has not been specified. Use the default one: no compression 错误,需如下配置
transcoder.addTranscodingHint(JPEGTranscoder.KEY_QUALITY, 0.99f);
svgConverte(svgFile, outFile, transcoder);
}
/**
-
SVG转PDF
-
@param svgCode SVG代码
-
@param outpath 输出路径
-
@throws TranscoderException
-
@throws IOException
*/
public void svg2PDF(String svgCode, String outpath) throws TranscoderException, IOException {
Transcoder transcoder = new PDFTranscoder();
svgConverte(svgCode, outpath, transcoder);
}
/**
-
SVG转PS
-
@param svgCode
-
@param outpath
-
@throws TranscoderException
-
@throws IOException
*/
public void svg2PS(String svgCode, String outpath) throws TranscoderException, IOException {
Transcoder transcoder = new PSTranscoder();
svgConverte(svgCode, outpath, transcoder);
}
/**
-
SVG转PS
-
@param svgCode SVG代码
-
@param out 输出流
-
@throws TranscoderException
-
@throws IOException
*/
public void svg2PS(String svgCode, OutputStream out) throws TranscoderException, IOException {
Transcoder transcoder = new PSTranscoder();
svgConverte(svgCode, out, transcoder);
}
/**
-
SVG转EPS
-
@param svgCode SVG代码
-
@param out 输出流
-
@throws TranscoderException
-
@throws IOException
*/
public void svg2EPS(String svgCode, OutputStream out) throws TranscoderException, IOException {
Transcoder transcoder = new EPSTranscoder();
svgConverte(svgCode, out, transcoder);
}
/**
-
SVG转EPS
-
@param svgCode
-
@param outpath
-
@throws TranscoderException
-
@throws IOException
*/
public void svg2EPS(String svgCode, String outpath) throws TranscoderException, IOException {
Transcoder transcoder = new EPSTranscoder();
svgConverte(svgCode, outpath, transcoder);
}
/**
-
SVG转PDF
-
@param svgCode SVG代码
-
@param out 输出流
-
@throws TranscoderException
-
@throws IOException
*/
public void svg2PDF(String svgCode, OutputStream out) throws TranscoderException, IOException {
Transcoder transcoder = new PDFTranscoder();
svgConverte(svgCode, out, transcoder);
}
/**
-
SVG转PDF
-
@param svgFile SVG文件
-
@param outFile 输出文件
-
@throws TranscoderException
-
@throws IOException
*/
public void svg2PDF(File svgFile, File outFile) throws TranscoderException, IOException {
Transcoder transcoder = new PDFTranscoder();
svgConverte(svgFile, outFile, transcoder);
}
private void svgConverte(String svgCode, String outpath, Transcoder transcoder) throws IOException, TranscoderException {
svgConverte(svgCode, getOutputStream(outpath), transcoder);
}
private static void svgConverte(File svg, File outFile, Transcoder transcoder) throws IOException, TranscoderException {
svgConverte(svg2String(getInputStream(svg)), getOutputStream(outFile), transcoder);
}
private static void svgConverte(String svgCode, OutputStream out, Transcoder transcoder) throws IOException, TranscoderException {
svgCode = svgCode.replaceAll(“:rect”, “rect”);
TranscoderInput input = new TranscoderInput(new ByteArrayInputStream(svgCode.getBytes()));
TranscoderOutput output = new TranscoderOutput(out);
svgConverte(input, output, transcoder);
}
private static void svgConverte(TranscoderInput input, TranscoderOutput output, Transcoder transcoder) throws IOException, TranscoderException {
transcoder.transcode(input, output);
}
public static InputStream getInputStream(File file) throws IOException {
return new FileInputStream(file);
}
public InputStream getInputStream(String filepath) throws IOException {
File file = new File(filepath);
if (file.exists())
return getInputStream(file);
else
return null;
}
public static OutputStream getOutputStream(File outFile) throws IOException {
return new FileOutputStream(outFile);
}
public OutputStream getOutputStream(String outpath) throws IOException {
File file = new File(outpath);
if (!file.exists())
file.createNewFile();
return getOutputStream(file);
}
/**
-
默认使用编码UTF-8 SVG文件输入流转String
-
@param svgFile
-
@return SVG代码
-
@throws IOException
*/
public static String svg2String(File svgFile) throws IOException {
InputStream in = getInputStream(svgFile);
return svg2String(in, “UTF-8”);
}
/**
-
SVG文件输入流转String
-
@param svgFile
-
@return SVG代码
-
@throws IOException
*/
public String svg2String(File svgFile, String charset) throws IOException {
InputStream in = getInputStream(svgFile);
return svg2String(in, charset);
}
/**
-
默认使用编码UTF-8SVG输入流转String
-
@param in
-
@return SVG代码
*/
public static String svg2String(InputStream in) {
return svg2String(in, “UTF-8”);
}
/**
-
指定字符集SVG输入流转String
-
@param in 输入流
-
@param charset 字符编码
总结
谈到面试,其实说白了就是刷题刷题刷题,天天作死的刷。。。。。
为了准备这个“金三银四”的春招,狂刷一个月的题,狂补超多的漏洞知识,像这次美团面试问的算法、数据库、Redis、设计模式等这些题目都是我刷到过的
并且我也将自己刷的题全部整理成了PDF或者Word文档(含详细答案解析)
66个Java面试知识点
架构专题(MySQL,Java,Redis,线程,并发,设计模式,Nginx,Linux,框架,微服务等)+大厂面试题详解(百度,阿里,腾讯,华为,迅雷,网易,中兴,北京中软等)
算法刷题(PDF)
am in 输入流
- @param charset 字符编码
总结
谈到面试,其实说白了就是刷题刷题刷题,天天作死的刷。。。。。
为了准备这个“金三银四”的春招,狂刷一个月的题,狂补超多的漏洞知识,像这次美团面试问的算法、数据库、Redis、设计模式等这些题目都是我刷到过的
并且我也将自己刷的题全部整理成了PDF或者Word文档(含详细答案解析)
[外链图片转存中…(img-b4tfzz8w-1715367474164)]
66个Java面试知识点
架构专题(MySQL,Java,Redis,线程,并发,设计模式,Nginx,Linux,框架,微服务等)+大厂面试题详解(百度,阿里,腾讯,华为,迅雷,网易,中兴,北京中软等)
[外链图片转存中…(img-cvMADGk3-1715367474165)]
算法刷题(PDF)
[外链图片转存中…(img-r068YQK5-1715367474165)]