src/share/classes/com/sun/tools/javac/file/RegularFileObject.java

changeset 1080
edd7d9bd32dd
parent 581
f2fdd52e4e87
child 2037
36e342dd57e2
equal deleted inserted replaced
1073:f85d980faaf8 1080:edd7d9bd32dd
1 /* 1 /*
2 * Copyright (c) 2005, 2009, Oracle and/or its affiliates. All rights reserved. 2 * Copyright (c) 2005, 2011, Oracle and/or its affiliates. All rights reserved.
3 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. 3 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
4 * 4 *
5 * This code is free software; you can redistribute it and/or modify it 5 * This code is free software; you can redistribute it and/or modify it
6 * under the terms of the GNU General Public License version 2 only, as 6 * under the terms of the GNU General Public License version 2 only, as
7 * published by the Free Software Foundation. Oracle designates this 7 * published by the Free Software Foundation. Oracle designates this
96 return new FileInputStream(file); 96 return new FileInputStream(file);
97 } 97 }
98 98
99 @Override 99 @Override
100 public OutputStream openOutputStream() throws IOException { 100 public OutputStream openOutputStream() throws IOException {
101 fileManager.flushCache(this);
101 ensureParentDirectoriesExist(); 102 ensureParentDirectoriesExist();
102 return new FileOutputStream(file); 103 return new FileOutputStream(file);
103 } 104 }
104 105
105 @Override 106 @Override
126 return cb; 127 return cb;
127 } 128 }
128 129
129 @Override 130 @Override
130 public Writer openWriter() throws IOException { 131 public Writer openWriter() throws IOException {
132 fileManager.flushCache(this);
131 ensureParentDirectoriesExist(); 133 ensureParentDirectoriesExist();
132 return new OutputStreamWriter(new FileOutputStream(file), fileManager.getEncodingName()); 134 return new OutputStreamWriter(new FileOutputStream(file), fileManager.getEncodingName());
133 } 135 }
134 136
135 @Override 137 @Override

mercurial