package com.gzcgxt.erp.test ;
import java.io.File;
import java.io.FileInputStream;
import java.io.FileNotFoundException;
import java.io.FileOutputStream;
import org.junit.Test;
public class MapperXML {
@Test
public void test1() throws Exception {
String header= newxml();
String footer= old();
StringBuffer sb=new StringBuffer();
sb.append(header).append(footer);
File f=new File("d:/UserMapper.xml" );
FileOutputStream out=new FileOutputStream(f);
out.write(sb.toString().getBytes());
out.close();
}
public String old() throws Exception
{
File f=new File("c:/UserMapper.xml" );
FileInputStream in=new FileInputStream(f);
byte[] buffer=new byte[1024];
int len=-1;
StringBuffer sb=new StringBuffer();
while((len=in.read(buffer))!=-1)
{
String s=new String(buffer,0,len);
sb.append(s);
}
in.close();
String[] arr = sb.toString().split("");
return arr[1];
}
public String newxml() throws Exception
{
File f=new File("e:/UserMapper.xml" );
FileInputStream in=new FileInputStream(f);
byte[] buffer=new byte[1024];
int len=-1;
StringBuffer sb=new StringBuffer();
while((len=in.read(buffer))!=-1)
{
String s=new String(buffer,0,len);
sb.append(s);
}
in.close();
String[] arr = sb.toString().split("");
String s= arr[0];
s=s+"";
return s;
}
}
package com.gzcgxt.erp.test;
import java.io.File;
import java.io.FileInputStream;
import java.io.FileNotFoundException;
import java.io.FileOutputStream;
import org.junit.Test;
public class MapperXML {
@Test
public void test1() throws Exception {
String header= newxml();
String footer= old();
StringBuffer sb=new StringBuffer();
sb.append(header).append(footer);
File f=new File("d:/UserMapper.xml" );
FileOutputStream out=new FileOutputStream(f);
out.write(sb.toString().getBytes());
out.close();
}
public String old() throws Exception
{
File f=new File("c:/UserMapper.xml" );
FileInputStream in=new FileInputStream(f);
byte[] buffer=new byte[1024];
int len=-1;
StringBuffer sb=new StringBuffer();
while((len=in.read(buffer))!=-1)
{
String s=new String(buffer,0,len);
sb.append(s);
}
in.close();
String[] arr = sb.toString().split("");
return arr[1];
}
public String newxml() throws Exception
{
File f=new File("e:/UserMapper.xml" );
FileInputStream in=new FileInputStream(f);
byte[] buffer=new byte[1024];
int len=-1;
StringBuffer sb=new StringBuffer();
while((len=in.read(buffer))!=-1)
{
String s=new String(buffer,0,len);
sb.append(s);
}
in.close();
String[] arr = sb.toString().split("");
String s= arr[0];
s=s+"";
return s;
}
}
WordPress database error: [Table 'yf99682.wp_s6mz6tyggq_comments' doesn't exist]
SELECT SQL_CALC_FOUND_ROWS wp_s6mz6tyggq_comments.comment_ID FROM wp_s6mz6tyggq_comments WHERE ( comment_approved = '1' ) AND comment_post_ID = 6033 ORDER BY wp_s6mz6tyggq_comments.comment_date_gmt ASC, wp_s6mz6tyggq_comments.comment_ID ASC